Wait for Changes
Control the amount of time Toffee will wait for changes in your application.
A duration consists of a positive integer value, followed by intervening whitespace, followed by a unit. Valid units are millisecond
, milliseconds
, and ms
; second
, seconds
, and s
; and minute
, minutes
, and m
.
Command | Explanation | |
---|---|---|
wait <duration> for pages to load | wait 10s for pages to load | Specifies the amount of time to wait for a page to finish loading. If the page does finish loading in the specified amount of time, the command results in an error. This command requires a browser to be open on the connected Performer. The setting only applies to that browser, until it is changed for that browser, or the browser is closed. |
wait 500 milliseconds for pages to load | ||
wait <duration> for commands to execute | wait 800ms for commands to execute | Specifies the amount of time the browser should spend searching for an element that does not immediately exist. If the target element is not found within that amount of time, commands will result in an error. This command requires a browser to be open on the connected Performer. The setting applies to all subsequent commands directed at that browser, until it is changed for that browser, or the browser is closed. |
wait up to <duration> until <locator> exists | wait up to 5 seconds until element at selector "div.notification" exists | Pauses execution of the script until the given locator exists on the page (or is removed from it), or becomes visible (or disappears) - but only up to the given duration. Unlike the wait <duration> for commands to execute command, this one is evaluated once and has no impact on subsequent commands. |
wait up to <duration> until <locator> does not exist | wait up to 5 seconds until element at selector "div.notification" does not exist | |
wait up to <duration> until <locator> is visible | wait up to 5 seconds until element at selector "div.notification" is visible | |
wait up to <duration> until <locator> is not visible | wait up to 5 seconds until element at selector "div.notification" is not visible |