[wtr-general] ie.goto never returns. Page never loads.
Hi, I'm pretty new to Watir and I'm having an intermittent problem with scripts hanging when a web page doesn't fully load. I'm trying to run:- Watir::IE.start(http://www.igindex.co.uk;) This sometimes works but sometimes the the start method doesn't return and the script simply hangs indefinitely so the rest of the script doesn't run. The issue with the website in question is probably due to the fact that it maintains a permanent http connection to stream data. This may be causing Watir to think the page hasn't fully loaded. Is there any way to force a Watir script to continue running before it thinks the page has fully loaded? thanks, Stuart --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[wtr-general] Re: ie.goto never returns. Page never loads.
Many thanks for your reply karim. I'm not sure that the information on this link helps. This page indicates how to wait if Watir doesn't explicitly wait. I want to explicitly NOT wait for a page to finish loading, because in essence the page 'never' loads fully due to the continuous http connection (comet). thanks, Stuart --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[wtr-general] Re: ie.goto never returns. Page never loads.
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 -~--~~~~--~~--~--~---