Updated code and tests to Selenium2