Waiting in TestDriver: Ensuring Stability and Reducing Flakiness
redraw
minimizes the risk of interacting with incomplete or incorrect elements.Feature | Description |
---|---|
redraw (automatic) | TestDriver automatically waits for UI changes and network activity to resolve. |
wait-for-text | Waits for specific text to appear on the screen. |
wait-for-image | Waits for a specific image or visual element to appear on the screen. |
redraw
:wait-for-text
Command:wait-for-image
Command:wait-for-text
wait-for-text
command pauses the test until the specified text appears on the screen. This is particularly useful for dynamic content that takes time to load.
wait-for-image
wait-for-image
command pauses the test until the specified image or visual element appears on the screen.
redraw
redraw
function is a built-in mechanism that automatically waits for the screen to stabilize before proceeding to the next step. This includes:
redraw
function to handle most waiting scenarios automatically.wait-for-text
or wait-for-image
for elements that take time to load.sleep
or wait
commands with dynamic waiting commands to improve test reliability.