> ## Documentation Index
> Fetch the complete documentation index at: https://momentic.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# assert

> Assert a condition about the screen using the AI agent.

Asserts a natural-language condition about the current screen. Fails the test
when the condition is not met. Use `assert` for fuzzy or visual conditions; for
an exact-text check prefer
[`checkScreenContains`](/reference/mobile-commands/check-screen-contains), which
is deterministic and cheaper. The simplified form takes the condition as a
single string.

## Parameters

| Parameter | Type      | Required | Description                                                 |
| --------- | --------- | -------- | ----------------------------------------------------------- |
| `that`    | `string`  | Yes      | The condition to assert.                                    |
| `timeout` | `number`  | No       | Milliseconds to wait for the condition to become true.      |
| `saveAs`  | `string`  | No       | Variable to store this step's return value on `env.<name>`. |
| `retries` | `number`  | No       | Times to retry the step on failure before failing the test. |
| `skipped` | `boolean` | No       | Skip this step at execution time.                           |

## Shorthand

Condition as a single string.

```yaml theme={null}
- assert: An order confirmation is visible
```

## Examples

```yaml theme={null}
- assert:
    that: The dashboard chart is visible and not cut off
    timeout: 10000 # poll for up to 10s before failing
```

## Related

* [Test format](/core-concepts/test-format)
* [Writing assertions](/core-concepts/writing-assertions)
