You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Watir General
Hi,
I am trying to test IE pop up window that looks similar to the 'Reload
Page with Form' (http://wiki.openqa.org/display/WTR/Reload+Page+with +Form) with OK and Cancel button. I need to click on the OK and Cancel
buttons, and have tried the following but it freezes up Watir:
$ie.modal_dialog.button(:text, "Cancel").click
I think I have the latest versions for both Ruby and Watir.
Please help. Thank you.
wesley chen
unread,
Oct 9, 2008, 8:07:50 PM10/9/08
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to watir-...@googlegroups.com
There is an easy way to deal with your problem: require 'watir/dialog'
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to watir-...@googlegroups.com
Hi Wesley,
I think it's a javascript pop up and I have tried your suggestions. It seems that if I use click_no_wait then the test stops before getting to the pop up window. Otherwise the screen just hangs.
Thanks,
Fatema
wesley chen
unread,
Oct 13, 2008, 10:45:10 PM10/13/08
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to watir-...@googlegroups.com
Try the method below: require 'watir/contrib/enabled_popup' require 'win32ole' module PopupClicker def ok_cancel_popup(ie,buttonname) 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 end