lib/watir/close_all.rb in watir-1.9.0.rc4 vs lib/watir/close_all.rb in watir-1.9.0.rc5

- old
+ new

@@ -21,18 +21,11 @@ public # close modal dialog. unlike IE#modal_dialog.close, does not wait for dialog # to appear and does not raise exception if no window is found. # returns true if modal was found and close, otherwise false def close_modal - begin - original_attach_timeout = IE.attach_timeout - IE.attach_timeout = 0 + while self.modal_dialog.exists?(0) do self.modal_dialog.close - true - rescue NoMatchingWindowFoundException, Wait::TimeoutError - false - ensure - IE.attach_timeout = original_attach_timeout end end end end \ No newline at end of file