Refactored selenium tests