Everything seems to be going fine, except for when I have a page that
has a fair amount of javascript to load. In these instances I find
myself doing Thread.Sleep(3000) a lot and the like. While this works,
it seems undesirable. Is there a better way to wait until all of the
javascript has finished loading, or after javascript redirects occur
to tell the webdriver to hold up for a moment?
My app has a large amount of javascript redirecting and processing
fields and as a result we often have things loading at startup.
If putting the thread to sleep is the best way then I will continue
down that path, just wondering if there was something similar to
waitForPageToLoad in webdriver land. Thanks
Sean Chambers
--
You received this message because you are subscribed to the Google Groups "webdriver" group.
To post to this group, send email to webd...@googlegroups.com.
To unsubscribe from this group, send email to webdriver+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/webdriver?hl=en.
bill
On Mar 23, 7:13 am, "Eran M." <eran....@gmail.com> wrote:
> Hi,
>
> The appropriate way would be to wait for a state of a page that indicates
> Javascript execution is done. The most trivial condition is presence of
> element or page title value. It's also possible to execute Javascript
> through the driver to inspect internal page state.
> You can find code examples in previous discussions on this list:http://groups.google.com/group/webdriver/browse_thread/thread/9f28184...
> look up "wait" and see other discussions related to this).
>
> Eran
>
> On 17 March 2010 04:42, Sean Chambers <schamber...@gmail.com> wrote:
>
> > I recently started using selenium and picked up webdriver as it seems
> > much more stable and doesn't require a serverside counterpart to
> > automate in a continuous integration server.
>
> > Everything seems to be going fine, except for when I have a page that
> > has a fair amount of javascript to load. In these instances I find
> > myself doing Thread.Sleep(3000) a lot and the like. While this works,
> > it seems undesirable. Is there a better way to wait until all of the
> > javascript has finished loading, or after javascript redirects occur
> > to tell the webdriver to hold up for a moment?
>
> > My app has a large amount of javascript redirecting and processing
> > fields and as a result we often have things loading at startup.
>
> > If putting the thread to sleep is the best way then I will continue
> > down that path, just wondering if there was something similar to
> > waitForPageToLoad in webdriver land. Thanks
>
> > Sean Chambers
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "webdriver" group.
> > To post to this group, send email to webd...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > webdriver+...@googlegroups.com<webdriver%2Bunsu...@googlegroups.com>