Refactored Selenium tests