Hello All. I am new to Ruby/Watir/Webdriver and am having trouble getting Watir-Webdriver to recognize a click on an image in IE when the image is partially "behind" another image. The issue is the same using IE9 and IE10. Webdriver does successfully recognize the click in Firefox and Chrome, just not IE, although I have to invoke the click differently between Firefox and Chrome (details below).
The HTML goes something like** this : <div id= "containerofthings"> <img id="containerimage" > <div id= "thing1"> <img id=thing1image"> </div> <div id= "thing2"> <img id=thing2image"> </div> </div> thing1image and thing2image are rectangular. thing2image is roughly 1/4 of the size of thing1image. thing2image has a z-index set to 1 and is positioned via css to be at the top right quarter of thing1image like this: In all three browsers I'm testing, IE, FF and Chrome, I can invoke a click on the thing2image with no issue. The problem comes in when I try to click on thing1image. The behavior is different in the different browsers being tested. 1) Firefox - I can click on thing1image with no issues but the same is not true on Chrome. 2) Chrome - I can click on thing1 (div) and that works in Chrome but not in Firefox. In Chrome, trying to invoke the click of thing1image throws an error. 3) IE9 - I tried to click on the thing1image, but it's registering as a click on thing2image. When launched through webdriver, I can't manually click on thing1image until the script concludes running (it times out since the element I'm looking for which results from the click isn't there). Once webdriver is no longer running I can click on the thing1image and invoke the processing as intended. Has anyone in the group seen this before? If so, can you please suggest how to resolve or at least work around for IE? ** The real code is much more complex than this as the container div is part of an element in a dynamic grid which is draggable and the application uses JSF, PrimeFaces, JQuery etc. Installed versions are as follows: selenium-webdriver (2.42.0), test-unit (2.0.0.0), watir-webdriver (0.6.10). Thank you! -C -- -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. [email protected] http://groups.google.com/group/watir-general [email protected] --- You received this message because you are subscribed to the Google Groups "Watir General" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
