Wait for text
wait_forWait until any of the specified texts appears on the page, then capture a snapshot. Returns immediately when text is found, so you don't waste time on fixed delays.
Instructions
Wait until one of several texts appears on the page, then snapshot it.
The right way to wait after an action that starts loading — far more reliable than guessing a delay, and it returns the moment the text shows up instead of always burning the whole timeout.
On success the page snapshot is included in the response, so no separate take_snapshot call is needed.
Polls the visible text twice a second. To wait for an element rather than for wording, use wait_for_selector.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | Texts to wait for — the wait ends as soon as any one of them appears. Passing both outcomes, e.g. ["Welcome back", "Login failed"], lets one call tell you which happened. Matching is a case-sensitive substring test against the page's visible text. | |
| browser | No | Which browser to act on. Each name is an independent Chrome, created on first use. Omit for the shared default; parallel agents each need their own name. | default |
| timeout | No | Maximum wait in milliseconds before giving up. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |