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

# checkPageContains

> Assert that the visible page text contains a substring.

Substring match against the page's rendered text. For semantic assertions, use
`assert`. For element-level matching, use the
[`checkElement`](/reference/commands/check-element) family.

## Parameters

| Parameter | Type      | Required | Description                                                           |
| --------- | --------- | -------- | --------------------------------------------------------------------- |
| `text`    | `string`  | Yes      | Substring that must appear on the page.                               |
| `timeout` | `number`  | No       | Maximum time in milliseconds to wait for the text.                    |
| `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

Text as a single string.

```yaml theme={null}
- checkPageContains: Momentic Staging
```

## Examples

```yaml theme={null}
- checkPageContains:
    text: cloud-ai-action-completion
    timeout: 90000
```

```yaml theme={null}
- checkPageContains:
    text: "{{ env.HEADER_NAME_GLOBAL }}"
    timeout: 5000
```

```yaml theme={null}
- checkPageContains:
    text: Interface theme
    iframe: https://example.com/settings
    timeout: 60000
```

## Related

* [Writing assertions](/core-concepts/writing-assertions)
* [Check element](/reference/commands/check-element)
* [Test format](/core-concepts/test-format)
