开发者

selenium.mouseOver does not open the menu

I have an application where I need to do mouseOver over a particular menu. The issue is that selenium.mouseOver is not able to open the respective menu, it just seems to highlight that div [it appears to be in pressed down state]. This div has 'onmouseover' attribute available which calls a javascript to expand this menu. Seems that when using selenium.mouseover this javascript is not getting called. It works fine when executed manually. I am using firefox 3.6 and it is a Richface application.

I also tried 开发者_Python百科with mouseDown and click but it does not work. Is there any solution or workaround available for this?


There are some issues (such as these for jquery) with regards to Selenium and mouseover events. You might try, if your browser supports it, the mouseenter event.


Try this

Actions builder = new Actions(driver);
Actions hoverOverRegistrar = builder.moveToElement(driver.findElement(By.xpath("blah blah")));
hoverOverRegistrar.perform();

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜