Do you have this " require 'watir/contrib/enabled_popup' " in code script?
--Mark -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Chong Jiang Sent: Tuesday, June 26, 2007 8:20 AM To: wtr-general@rubyforge.org Subject: [Wtr-general] Handling Popup Could someone elaborate on this a bit? I have the same issue but with a text_field.set causing the JS popup. My slight variation on the code below has enabled_popup timing out with an exception (which I rescue), but execution on the main thread is still blocked by the popup. Thanks in advance, Chong > I had to alter this method when I had a Pop-up occur from clicking a > radio button (couldn't use the click_no_wait). This seemed to get me > past that problem. > > > require 'tread' > > ... > > def startClicker(button, ieObj) > # Strart a new thread that will dismiss the JSPopup. > if ieObj != nil then > t = Thread.new { > w = WinClicker.new > hwnd = ieObj.enabled_popup(10) if nil == hwnd > w.clickWindowsButton_hwnd(hwnd, button) > t.join > t = nil > w = nil > } > end > > ... > > startClicker('OK', $ie) > switch_role.role.select("my role") > > Hope this helps, > > --Mark > _______________________________________________ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general