selenium tests refactoring