Wait until the specified text is detected on the screen.
wait-for-text
command waits until the specified text is detected on the screen. This is useful for ensuring that textual elements are present before proceeding with the next steps in a test.
Argument | Type | Description |
---|---|---|
text | string | The text to find on the screen. |
timeout | number | (Optional) The duration in milliseconds to wait for the text to appear. Default is 5000 (5 seconds). |
method | enum | (Optional) The matching algorithm to use. Possible values are ai and turbo . Default is turbo |
timeout
value based on the expected load time of the text to avoid unnecessary delays.timeout
, the command will fail.wait-for-text
command is ideal for synchronizing tests with textual elements that may take time to load.