Web browser automation testing using Selenium 2 (WebDriver) and JavaScript