DaFallus
6/30/2006 8:35:00 PM
I was able to get Watir to handle most JavaScript alert windows using
the following method:
require 'watir'
def startClicker( button , waitTime = 3)
w = WinClicker.new
c = "start rubyw c:\\Watir\\clickJSDialog.rb #{button} #{waitTime}"
w.winsystem(c)
w=nil
end
The only problem I'm experiencing now is that when I have Watir click
through about 16 different buttons that all cause JavaScript alert
windows to pop-up it will not click through one or two of the alert
windows.
Instead of clicking the OK button on the alert window that pops up it
just changes focus back to the IE window and waits for me to push the
OK button for it.
It is strange because whenever there is a malfunction it is always on
the same buttons. However, sometimes it works and sometimes it doesn't.
Any ideas?