2

I have a web application, in that application the head menus open when we move mouse on to that (I don't want to click on that head menus because clicking on that menus redirect the page to another page). On mouse over it opens a menu list, I will be able to select the menu item but not able to hover on to the head menu so that a drop-down menu list can appear.

fire_event("onmouseover") is not working, it is only flashing that menu(element) but not opening the drop down menu list.

Can any one give me the solution How can I put hover on to any HTML element please.

Gaurav Sharma
  • 349
  • 4
  • 13
  • 1
    Can you share the HTML of your page or a test page? These types of problems are dependent on how your menu is implemented. – Justin Ko Sep 07 '12 at 16:17
  • It is a simple hover menu, displays a menu when we put our mouse cursor on to it (only hover, not click). – Gaurav Sharma Sep 12 '12 at 07:47

2 Answers2

5

Well, there is #hover method:

browser.element(:how => what).hover

And this could also help: How to find out which JavaScript events fired?

Community
  • 1
  • 1
Željko Filipin
  • 56,372
  • 28
  • 94
  • 125
1

For some reason .hover doesn't work for me, but this one does:

browser.element(how: what).fire_event(:mouseover)

No idea why.

yegor256
  • 102,010
  • 123
  • 446
  • 597