wait
The wait action pauses test execution for a specified duration before proceeding to the next step. This is useful for adding delays, for example, to allow time for animations to complete or to make recordings easier to follow.
The value assigned to the wait key is the duration to pause in milliseconds, 0 or more. You can also set it to:
trueto pause for 5000 milliseconds. Reports show the step as"wait": 5000.falseto skip the step.- An environment variable, such as
"$WAIT_DURATION", that holds a number of milliseconds.
For comprehensive options, see the
waitreference.
Examples
The docs tests run the two fixed-duration examples. The variable and default-duration examples are illustration-only.
Wait for 3 seconds
Wait for 500 milliseconds
Wait for a duration set by a variable
Set the duration from an environment variable so one value drives every wait in a suite. Load the variable first, then reference it with $VAR.
Wait for the default duration
Pass true to pause for the default 5000 milliseconds without naming a number.