My particular situationis that II have some fancy pulldown menus in
our app that are a bit of a challenge to automate since they are very
event driven (pulling up the pop-down menus when you mouse over or
click on the menu name) I'd been working with them by using either
an onmouseover or a click to make the menu appear, followed by
clicking the (now visible) link for the menu item I want. That was
working in FF7. Now with FF8 the item shows up ever so briefly (on a
click) and then vanishes, or never even shows up at all (as if the
event was never fired)
With FF7 I was able to work with them by using code along these lines
$browser.ul(:id => 'secondary_nav').li(:class => 'has_child_items
selected first').click
$browser.link(:text, 'Create New').click
(the menu bar is a UL (unordered list), and each LI element is one of
the top level menus. The click/mouseover on that item causes the
'pulldown' menu to appear. Thus allowing to click on the menu item
(in the form of a link) that is desired.)
In FF7 that code works just fine, in FF8 the sub-menu is not visible
(or not vis long enough) and generates the element not visible
message.
Is there perhaps some way in watir-webdriver to directly position the
actual mouse cursor over an object in the DOM so that we get a
'genuine' hover response from the browser?
Here's a sample CSS based menu of the type I am speaking of
https://www.servage.net/blog/wp-content/uploads/2009/03/css-menu.html
Note that sample is 'very pure-CSS' and won't work on earlier IE
versions. (most 'real' menus of this variety do have some additional
javascript in them to allow the menus to work with earlier IE, but for
many of those, mouseover events seem to work to make the menus dance.
Unfortunately the stuff in my app, while it does work with earlier IE,
still won't dance to the mouseover tune.)
if anyone can find a good way to automate this in Watir or Watir-
Webdriver for IE and FF8 I'd love to see code.
At the moment I'm kludging it by executing a bit of JQuery javascript
(to modify the CSS for the appropriate class+element combination and
change display from none to block so it renders all the menus visible)
and then clicking the link. Something a bit more organic would be
nice.
if anyone can find a good way to automate this in Watir or Watir-
Webdriver for IE and FF8 I'd love to see code.