assert, but the agent reasons over the screenshot rather than
the DOM (web) or accessibility/XML hierarchy (mobile). Use this when the
property under test is purely visual, such as color, layout, icons, or charts,
or when the underlying structure is unavailable or unreliable.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
that | string | Yes | What must be true on the page, purely from the screenshot. |
timeout | number | No | Maximum time in milliseconds to wait. |
iframe | string | No | URL or URL pattern of the iframe that contains the target element. |
saveAs | string | No | Name of the variable to write this step’s return value to. |
retries | number | No | Number of times to retry the step on failure before failing the test. |
skipped | boolean | No | Skip this step at execution time. |
Shorthand
Assertion text as a single string.Examples
assertVisually evaluates the assertion from the screenshot only and
skips capturing the accessibility/XML hierarchy. Reach for it when the screen is
rendered in a way the hierarchy cannot describe (for example a WebView with
multiple pages) or the condition is purely visual.