fixing bug by porting to Selenium 2