Re: [wtr-general] Re: How to wait following an external frame link click.
On Fri, Dec 18, 2009 at 1:13 AM, bender25 zuzi...@yahoo.com wrote: I have extended my default wait timeout period to 20 mins 20 minutes! :) Željko -- 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: How to wait following an external frame link click.
I have extended my default wait timeout period to 20 mins and used the wait_until { ... } syntax suggested in the link provided by Željko - which has delivered me a successful outcome. Thanks for everyone's help. On Dec 16, 11:10 pm, Željko Filipin zeljko.fili...@wa-research.ch wrote: On Wed, Dec 16, 2009 at 6:00 AM, bender25 zuzi...@yahoo.com wrote: I am having trouble getting my watir test case to wait until the processing comes to an end. Have you read this? http://wiki.openqa.org/display/WTR/How+to+wait+with+Watir Željko -- watir.com - community manager watirpodcast.com - host -- 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
Re: [wtr-general] Re: How to wait following an external frame link click.
If you use IE, please try: Watir::Waiter.wait_until{$ie.link(:text, Test copy listing #{$listing.listing_id}).exists?} This wait will at most last for 60 seconds. If you want to wait for more time, please turn to* watir.rb* to change the *@@default_timeout = 60.0* to more; If you use firefox, please turn to *firefox.rb*, wait method, *def wait(last_url = nil) #puts In wait function isLoadingDocument = start = Time.now while isLoadingDocument != false isLoadingDocument = js_eval(#{browser_var}=#{window_var}.getBrowser(); #{browser_var}.webProgress.isLoadingDocument;) #puts Is browser still loading page: #{isLoadingDocument} # Raise an exception if the page fails to load if (Time.now - start) 300 raise Page Load Timeout end end* change the 300 in red to 420. I have ever tried that in FF, it works. I wait for two hours until a stuff load in FF3.5. Thanks. Wesley Chen. For life, the easier, the better. On Wed, Dec 16, 2009 at 2:13 PM, bender25 zuzi...@yahoo.com wrote: page does many refreshes / loa -- 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: How to wait following an external frame link click.
Hmmm, I may have spoken too soon about seeing the page's refresh status following the click. It appears that my page does many refreshes / loads that report themselves as done during the processing, so watir cuts out after the first done is complete. I may just very well be stuck hardcoding a wait time Yuck code, but I can't see any other way. On Dec 16, 4:00 pm, bender25 zuzi...@yahoo.com wrote: Hi all, The following problem applies to my watir 1.6.5 installation running on Windows XP Professional I have a web page to test which contains some code that looks like the following: iframe src=myFrame.html .. /frame myFrame.html contains a series of controls, including a save button - which is a link. On clicking the save button, a lengthy process is carried out that usually takes 5 min to complete. I am having trouble getting my watir test case to wait until the processing comes to an end. I have scripted the save button click and wait in my test as follows: $browser.frame(:id, frameId).link(:id, saveButton).click() $browser.wait() However find that the $browser.wait() does not wait for the data processing to complete, the test pretty much completes right after clicking the save button. I can say that the browser shows that the page is being refreshed / loaded for the full processing period - if that is of any relevance. And I'm guessing that the $browser.wait() is not working due to the click event taking place in an area outside the scope of the current page. I am in the process of trying out the use of $browser.wait(420) to force the test to wait for 7 minutes, however would rather not have to use a set number of seconds to wait if there is a better way to conduct this test. Thanks for any input to this matter. -- 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