Javascript Alerts with Watir

C

Chris

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?
 
C

Chris

Ok, I restarted my computer today and now for absolutely no reason I
cannot get Watir to click through any of the JavaScript alert windows
anymore.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top