[Windmill-dev] How to wait correctly?
Mikeal Rogers
mikeal at osafoundation.org
Tue Apr 29 09:36:16 PDT 2008
You should refer to the Controller API documentation in the
WindmillBook for all available api calls.
We have an entire waits namespace, which includes a sleep command but
we strongly discourage using it. Instead we encourage using the
conditional waits commands when you need to wait for dynamic content
to load, this is much more efficient since it only waits as long as it
needs for the content to load and doesn't slow down your tests with a
bunch of static sleeps.
http://windmill.osafoundation.org/trac/wiki/BookChapter-4-1-TheControllerAPI
Relevant portion;
waits.sleep
Make the browser sleep for a given number of seconds. Takes a
single param; milliseconds.
waits.forElement
Waits for a DOM element to exist, or times out. Takes all locator
params and an optional param; timeout.
waits.forPageLoad
Waits for a new page to load in the testing window. Takes all an
optional param; timeout.
waits.forNotTitle
Waits for the testing window to NOT have the provided title.
Requires a param; title, and has an optional param; timeout.
-Mikeal
On Apr 29, 2008, at April 29, 20082:55 AM, Niko Sams wrote:
> Hi,
>
> I'm new in Windmill and trying to use it for Ajax applications. I
> created a
> first test, see the attached test.json. Run it on http://www.vivid-planet.com/
>
> That /test/slow/ is a page that has 5sec sleep before any response.
> Additionally I added some JavaScript (see source) that adds async an
> element.
>
> How should I use the waits to test this page?
>
> thanks,
> Niko
> <test.json>_______________________________________________
> Windmill-dev mailing list
> Windmill-dev at osafoundation.org
> http://lists.osafoundation.org/mailman/listinfo/windmill-dev
More information about the Windmill-dev
mailing list