Mouse Hover on WebElement using Selenium 2 in Java [duplicate]
Possible Duplicate:
Is there a proved mouseOver workaround for FirefoxDriver in Selenium2?
I want to be able to mouse hover a WebElement with the Java Selenium2 API. Is that possible? I am using the current beta 3.
This will help you:
WebElement elems=driver.findElement(By.linkText("Custom Development"));//Menu Item
WebElement elems1=driver.findElement(By.xpath("//li[@id='item-465']/a"));//Menu
Actions builder = new Actions(driver);
Actions hoverOverRegistrar = builder.moveToElement(elems1);
hoverOverRegistrar.perform();
elems.click();//at last Menu Item Click
精彩评论