Pls use clicknowait method .. It would work ..
Sent from my iPhone
On 22 Jan 2010, at 22:53, capri <capricorn...@gmail.com> wrote:
Hi,
I tried the below code to identify "file download -security warning"
message using autoit in my watir script. However it does not seem to
work. I am trying to click the 'Run' button of this window. On
running the script, it gets struck and doesn't show any errors. Any
thoughts,inputs would be highly appreciated.
many thanks.
Code:
---------
require 'watir'
require 'rubygems'
require 'win32ole' # to invoke Autoit controls
ie=Watir::IE.new
autoit=WIN32OLE.new('AutoItX3.Control')
ie.goto "http://www.cooliris.com"
ie.link(:html,/return InstallHelper.clickedDownload()/).click
r=autoit.WinExists("File Download - Security Warning")
puts r
res=autoit.WinWait("File Download - Security Warning",'',3)
puts res
res=autoit.WinActivate("File Download - Security Warning")
puts res
res=ie.autoit.ControlFocus("File Download - Security Warning","",
"&Run")
res=ie.autoit.ControlClick("File Download - Security
Warning","","&Run")
puts res
puts "\n"
--
You received this message because you are subscribed to the Google
Groups "Watir General" group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines:
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/watir-general
--
You received this message because you are subscribed to the Google Groups "Watir
General" group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines:
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/watir-general