If we're not dealing with a modal dialog, but an actual new window, often Watir
doesn't wait correctly since it's only worrying about whether the current
window is done loading, not what the pop-up is doing. Here's my fix:
def get_popup(how, what)
tries = 100
popup = nil
until popup do
begin
sleep(0.1)
popup = IE.attach(how, what)
rescue => e
raise e if (tries -= 1) <= 0
end
end
popup
end
@ie_popup_window = get_popup(:title, /Drive Admin/)
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.openqa.org/thread.jspa?threadID=6726&messageID=19599#19599
_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general