I recently added this code to my script and it clicks ok on the popup.
That's awesome, but now the script will not terminate. I just began
learning Ruby about a week ago and it seems like there is something
simple that's preventing the script from ending, but I'm not sure what
it is. I copied the code from
http://wiki.openqa.org/display/WTR/JavaScript+Pop+Ups.
begin
autoit = WIN32OLE.new('AutoItX3.Control')
loop do
#autoit.ControlClick("TITLE",'', 'BUTTON TEXT')
#autoit.ControlClick("Security Information",'', '&Yes')
#autoit.ControlClick("Security Alert",'', '&Yes')
#autoit.ControlClick("Security Warning",'', 'Yes')
autoit.ControlClick("Message from webpage",'WARNING! ', 'OK')
# other options can be included here
sleep 1
end
rescue Exception => e
puts e
end
--
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]