Hi All,
 When i run the below code close function of watir 1.6.5 doesn't work fine
after handling a pop-up.But of watir 1.6.2 work fine in the same situation.
I would request to the Watir developers please resolve this problem.

require 'watir'
require 'rubygems'
require 'win32ole'
require
'C:\\ruby\\lib\\ruby\\gems\\1.8\\gems\\watir-1.6.2\\lib\\watir\\ie-class'

#Note:- I have used the above require line because close function of Watir
1.6.5 was not working fine after handling a pop-up.

$ie=Watir::IE.new
$ai=WIN32OLE.new("AutoItX3.Control")

$ie.goto("http://www.google.com/";)
$ie.textfield(:name,"q").set("Ruby")
$ie.button(:name,"btnG").click

$ie.goto("http://www.autoitscript.com/autoit3/downloads.shtml";)
$ie.image(:src,/download_autoit/).click_no_wait

$ai.WinWait("File Download - Security Warning","",30)
$ai.WinActivate("File Download - Security Warning")
$ai.ControlClick("File Download - Security Warning","","&Save")

$ai.WinWait("Save As","",30)
$ai.WinActivate("Save As")
$ai.ControlSend("Save As","","Edit1", "C:\AutoItV3.exe")
$ai.ControlClick("Save As","","&Save")

$ie.close  #Here at this place watir 1.6.5 close function doesn't work fine
after handling the above pop-up but close function of watir 1.6.2 works fine
in the same situation.

For more information please check source code of close functions of both the
versions(1.6.5 and 1.6.2) of Watir through this path :-

C:\ruby\lib\ruby\gems\1.8\gems\watir-1.6.5\lib\watir\ie-class.rb
C:\ruby\lib\ruby\gems\1.8\gems\watir-1.6.2\lib\watir\ie-class.rb

Thanks & Regards,
Ankur Gera
TCS
-- 
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

Reply via email to