开发者

Mouse Hover on WebElement using Selenium 2 in Java [duplicate]

This question already has answers here: 开发者_运维技巧 Closed 10 years ago.

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
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜