Selenium rewrite