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
Post a Comment