Unable to perform Mouseover and click in selenium webdriver -


i want perform mouseover function on element using selenium webdriver in java. code using is:

        actions actions = new actions(driver);         webelement menuhoverlink = driver.findelement(by.xpath(".//a[@title='directory'][.='people']"));         actions.movetoelement(menuhoverlink).build().perform();         webelement sublink = driver.findelement(by.xpath(".//*[@id='peoplesubmenu']/ul/li[1]/a"));         sublink.click(); 

but code not working when mouse moved. please suggest me solution

try this, form of vignesh posted below

new actions(driver).movetoelement(menuhoverlink).perform(); new actions(driver).movetoelement(sublink).perform(); sublink.click(); 

Comments

Popular posts from this blog

java - How to specify maven bin in eclipse maven plugin? -

single sign on - Logging into Plone site with credentials passed through HTTP -

php - Why does AJAX not process login form? -