I found this in a different thread. It suggests running goto in a different thread, then sleeping for a few seconds until its likely to have loaded. Its not ideal, but it works:-
---------- Forwarded message ---------- From: LFIdnl <sraniim...@gmail.com> Date: Dec 10 2008, 7:33 am Subject: Modal Dialog goto with no wait To: Watir General In these cases I execute command in another thread. If anybody suggest another usefull method I will be happy :) . Try this: ... thr = Thread.new { ie.goto "javascript:OpenPage();"} sleep(3) #time to wait of javascript popup thr.kill puts ie.modal_dialog.html # now must gets here On 10 дек, 06:42, Sean <srphe...@gmail.com> wrote: > Hello All -- > I'm trying to launch a modal dialog using the following code. I > believe I have to tell the goto to not wait for the page to finish > loading but I cant find out how. if it was a button, I could use > click_no_wait. Is there a goto_no_wait or a way I can tell Watir to > not wait. Thanks in advance. > ie = Watir::IE.new > loginURL = "login.aspx" > puts "Opening login page (#{loginURL}) ... " > ie.goto loginURL > Watir::Waiter::wait_until {ie.text_field(:name, "txtUser").exists?} > ie.text_field(:name, "txtUser").set username > ie.text_field(:name, "txtPassword").set password > ie.button(:name, "cmdLogin").click > ie.goto "javascript:OpenPage();" > puts ie.modal_dialog.html # never gets here --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Watir General" group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~----------~----~----~----~------~----~------~--~---