[Wtr-general] Div Access
Michael Ehrich
meh at konomy.com
Thu Sep 7 11:42:22 EDT 2006
Hi my name is Michael,
i have a problem with div access. i got a sample page with an external js
file. the js file creates a dynamtic popup menu with several subfolders. all
data is located in an array. at the end of the js it is written on the file
by document.writeln
so when i try ie.div(:id,'menuItem0').click it seems to work i can see the
yellow clicking mark. but the problem is the div has several onlick
onmouseover events which are used to open the subfolders. and when i try
ie.div(:id,'menuItem0').fireEvent("onMouseOver") i get the same result as
.click but it ignores the js command in the onmouseover or onclick parts.
i thought it might be a general problem so that watir is not able to access
divs in that way so i built a simple version of the script.
<div id="test1" onmouseover="window.open('http://www.yahoo.de','','');
<http://www.yahoo.de%27,%27%27,%27%27%29;%22> ";
onclick="window.open('http://www.google.com','','');
<http://www.google.com%27,%27%27,%27%27%29;%22> "; >TEST</div>
i tried to access and it worked.. so im confused. the only difference to the
js is that the js is a bit more complicated and that there are more elements
but its based on the same structure. i thought it might be cuz it is written
by js but why do the first elements of the menu blink when i access them
with ruby. i get all the divs with show_divs() too so watir has no
identifing problems.
i have no solution maybe if someone has any idea whats wrong plz tell me thx
so far
Greetings Michael
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060907/33004edc/attachment-0001.html
More information about the Wtr-general
mailing list