## Documentation Index

Fetch the complete documentation index at: [/docs/llms.txt](/content/docs/llms.txt)

Use this file to discover all available pages before exploring further.

Accepts the same parameters as [`assert`](/content/docs/reference/commands/assert/index.html) (`that`, `timeout`, `iframe`, `saveAs`, `retries`, `skipped`), but the agent reasons over a screenshot of the current viewport rather than the DOM (web) or accessibility/XML hierarchy (mobile). Use `assertVisually` when the condition is visual and fully inside the current viewport, for example an event block sitting in the 11:30-12:00 row of a calendar grid, or a detail inside a video frame or canvas drawing. Scroll the target into view if necessary before calling it; otherwise use `assert`.

## 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.

```
- assertVisually: there is a twitter profile shown on the page
```

## Examples

```
- assertVisually:
    that: |
      the module's two substeps (return 1 and return 2) both have green check
      marks to their left, but the top-level "return 3" step that comes after
      the module does NOT have a green check mark
    timeout: 60000
```

```
- assertVisually:
    that: |
      none of the step cards on the left-hand side of the editor have
      a green check mark next to them
```

On mobile, `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.

```
- assertVisually: the cart shows a red error banner above the checkout button
```
