[Wtr-general] Watir Click with no response nor error message

Michael Ehrich meh at konomy.com
Mon Oct 2 02:34:39 EDT 2006


Hi,

 

i got a javascript generated popup menu which creates divs for the submenus
and tables for the topmenus.

I can access all the topmenus and submenus through the code below. You can
see the menus flashing

and the submenus opening but when i send the fireevent "onClick" or just
.click i only get a yellow blink

but no click response. The divs created by the popup creater are built like
this

 

<div onmouseover="popmion(this.id)" onmouseout="popmioff(this.id)"
onclick="popNewin(this.id)" onmousedown="popmidown(null,this.id)" >

 

The onclick method opens the new page the other scripts are just to open
submenus or close previous opened menus.

 

 

require 'watir'

 

ie = Watir::IE.new

page = 'http://localhost/kintelliadm/servlet/AdminLoginServlet'

 

ie.goto(page)

 

ie.frame("mainFrame").text_field(:name, 'user').set('admin')

ie.frame("mainFrame").text_field(:name, 'password').set('admin')

ie.frame("mainFrame").button(:name, 'submitlogin').click

 

ie.frame("mainFrame").frame("menuFrame").table(:id
,'popMaini')[1][1].fireEvent('onMouseOver')

sleep 1

ie.frame("mainFrame").frame("menuFrame").table(:id
,'popMaini')[1][1].fireEvent('onMouseOut')

 

ie.frame("mainFrame").frame("menuFrame").div(:id
,'menuItem7').fireEvent('onMouseOver')

 

ie.frame("mainFrame").frame("menuFrame").div(:id ,'menuItem7').flash

sleep 1

ie.frame("mainFrame").frame("menuFrame").div(:id
,'menuItem7').fireEvent('onMouseOver')

sleep 1

ie.frame("mainFrame").frame("menuFrame").div(:id
,'menuItem7').fireEvent('onClick')

sleep 1

ie.frame("mainFrame").frame("menuFrame").div(:id
,'menuItem7').fireEvent('onMouseOut')

 

ie.frame("mainFrame").frame("menuFrame").div(:id ,'menuItem7').click

 

 

i can attach the full javascript if someone wants to look deeper in it but i
cant see any corruption so far and

if there would be a corruption in the javascript why would i be able to
access all the menus through ruby.

 

p.s. i dont get any error messages from ruby

 

 

best regards 

michael ehrich

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20061002/11264f15/attachment.html 


More information about the Wtr-general mailing list