# wait

> Wait a set time and take a screenshot, or poll the screen until some text shows up or goes away.

Source: https://zeptap.com/docs/cli/commands/wait



## Usage [#usage]

```sh
zeptap wait [<ms>]
zeptap wait --text <text> [--timeout <duration>]
zeptap wait --gone <text> [--timeout <duration>]
```

## Options [#options]

| Option                 | Description                                                      |
| ---------------------- | ---------------------------------------------------------------- |
| `<ms>`                 | How long to wait, in milliseconds (default 1000, at most 120000) |
| `--text <text>`        | Poll OCR until a line containing this text is on screen          |
| `--gone <text>`        | Poll OCR until no line contains this text                        |
| `--timeout <duration>` | How long to poll for `--text` or `--gone` (default 10 seconds)   |

Also takes the [global options](https://zeptap.com/docs/cli#global-options).

## Details [#details]

* Use a plain wait for loading screens and animations, and to let a video play.
* `--text` and `--gone` check the screen about every 0.7 seconds. On success they print the text's position and take a screenshot.
* On timeout they exit with code 6 and still save a screenshot, so the agent can see what's there instead.

## Examples [#examples]

```sh
$ zeptap wait -l 7 3000
$ zeptap wait -l 7 --text "Posted" --timeout 30s
$ zeptap wait -l 7 --gone "Uploading"
```

## MCP tool [#mcp-tool]

[`wait`](https://zeptap.com/docs/agents/tools#wait) for a plain wait. `--text` and `--gone` are CLI only.
