Hello Everybody,
I am not able to handle browser pop ups.Following are the details.
I am using Watir 1.6.2
require 'rubygems'
require 'firewatir'
include FireWatir
require "logger"
require 'net/smtp'
require 'win32ole'
require 'watir/dialog'
require 'watir/ie'
require 'watir/contrib/enabled_popup'
require 'watir/WindowHelper'
require 'watir/winClicker'
require 'watir/close_all'
ff=Firefox.new
w = WinClicker.new()
ff.goto("test_site")
def popup_clicker(ff,buttonname)
hwnd = ff.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
ff.image(:src,"/images/delete.png?1231830355").click
popup_clicker("OK", 3)
On executing the above code i am getting error as Undefined method
ENABLED_POPUP
Suggestions and Solutions are Welcome
I had found the above code from some post only.
ff.image(:src,"/images/delete.png?1231830355").click
Actually what i am trying to do is On executing above line pop up
appears and has two buttons i.e. OK and Cancel
I want it to click on OK button.
Can somebody help me on this??
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---