I have a modal dialog with an OK button. When clicked, the modal dialog is dismissed and a Javascript alert window appears with a Close button. I want to click the Close button to dismiss this window.
What I am finding is that usig click_no_wait on the modal dialog OK button does not dismiss the modal dialog and the Javascript alert window never appears. If I use click on the modal dialog OK button instead, the modal dialog is dismissed as desired and the Javascript alert window appears as desired, but the the enabled_popup method raises an exception on the line: Watir::until_with_timeout(timeout) do Example code: ie.frame( "fraDataZone" ).image(:id,'imgAction0').click_no_wait #launches modal dialog sleep(5) if ie.modal_dialog.button( :id, 'imgOKButton' ).exists? ie.modal_dialog.button( :id, 'imgOKButton' ).click # OK, dismiss modal dialog end # Click OK button on Javascript Alert window (title is "Microsoft Internet Explorer") # hwnd = ie.enabled_popup(5) if( hwnd ) w = WinClicker.new w.makeWindowActive( hwnd ) w.clickWindowsButton_hwnd( hwnd, 'imgFinishButton' ) end sleep(3) This was run with the suggested modification to the enabled_popup method (adding the line: "include Win32" before the line "def enabled_popup(timeout=4). ) I have used sleep stmts to slow things down with the same results. How do I get both the modal dialog and Javascript alert window to be dismissed ? --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=4892&messageID=13582#13582 _______________________________________________ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general