Try this: require 'watir\contrib\enabled_popup'
<Your code> # use click_no_wait to click the button that invokes the JS Alert $ie.button.click_no_wait hwnd = ie.enabled_popup(5) # get a handle if one exists if (hwnd) # yes there is a popup w = WinClicker.new w.makeWindowActive(hwnd) # "OK" or whatever the name on the button is w.clickWindowsButton_hwnd(hwnd, "OK") end --Mark ________________________________________ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of David Munns Sent: Wednesday, October 04, 2006 10:19 AM To: [email protected] Subject: [Wtr-general] Javascript Alert windows Does Watir have a way of processing Javascript Alert windows, by clicking the OK button to dismiss the window? The code that invokes the window issues an alert call with no window handle. I did not find anything on this in the online docs or in the email dist. _______________________________________________ Wtr-general mailing list [email protected] http://rubyforge.org/mailman/listinfo/wtr-general
