refactored auto functional tests with webdriver.js