Description
Thewait-for-image command waits until the specified image is detected on the screen. This is useful for ensuring that visual elements are present before proceeding with the next steps in a test.
Arguments
| Argument | Type | Description |
|---|---|---|
description | string | A description of the image. |
timeout | number | (Optional) The duration in milliseconds to wait for the image to appear. Default is 10000 (10 seconds). |
invert | boolean | (Optional) If set to true, the command will wait until the specified image is NOT detected. Default is false. |
Example usage
Protips
- Use clear and concise descriptions for the image to improve detection accuracy.
- Adjust the
timeoutvalue based on the expected load time of the image to avoid unnecessary delays.
Gotchas
- If the image doesnβt appear within the specified
timeout, the command will fail. - Ensure the description accurately represents the image to avoid detection issues.
The
wait-for-image command is ideal for synchronizing tests with visual elements that may take time to load.
