Wait until an image matching the description is detected on the screen.
The wait-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.
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 5000 . |
timeout
value based on the expected load time of the image to avoid unnecessary delays.timeout
, the command will fail.wait-for-image
command is ideal for synchronizing tests with visual elements that may take time to load.