extendedWaitUntil
Wait for an element with a custom timeout longer than the default.
The extendedWaitUntil command pauses the test flow until a specified element becomes visible or not visible on the screen. The command completes as soon as the condition is met. If the condition is not met before the timeout expires, the command fails.
TIP
Use extendedWaitUntil before assertVisible or assertNotVisible when your app needs longer than the default 7-second timeout. The command keeps checking until the condition is met or your extended timeout is reached, so it does not stop after 7 seconds.
Arguments
| Argument | Description |
|---|---|
visible | The selector for the element to wait for. The command proceeds when the element is visible. |
notVisible | The selector for the element to wait for. The command proceeds when the element is no longer visible. |
timeout | The maximum time to wait, in milliseconds. |
For a complete list of available selectors, see the Selectors reference.
Usage examples
Wait for an element to be visible
This example waits up to 10 seconds for an element containing the text "My text that should be visible" to appear.
- extendedWaitUntil:
visible: "My text that should be visible"
timeout: 10000Wait for an element to be not visible
This example waits up to 10 seconds for an element with the ID elementId to disappear.
- extendedWaitUntil:
notVisible:
id: "elementId"
timeout: 10000Related content
Learn how to use wait commands in flows to create reliable tests.
