Refactored Selenium utilities.