I am sure if you search detailed in the group, you can get the solution.
Below is one way to deal with the problem.
require 'watir'
def popup_clicker(ie,buttonname)
require 'watir/contrib/enabled_popup'
require 'win32ole'
hwnd = ie.enabled_popup(5)
if(hwnd) #yeah! a popup
popup = WinClicker.new
popup.makeWindowActive(hwnd) #Activate the window.
popup.clickWindowsButton_hwnd(hwnd,buttonname) #Click the button
#popup.clickWindowsButton(/Internet/,buttonname,30)
popup=nil
end
end
ie=Watir::IE.attach(:title,/javascript/)
ie.link(:text,/click/i).click_no_wait
popup_clicker(ie,"OK")
Thanks.
Wesley Chen.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Watir General" group.
To post to this group, send email to [email protected]
Before posting, please read the following guidelines:
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/watir-general
-~----------~----~----~----~------~----~------~--~---