session_wait
Wait for a page to reach a known state—load event, URL substring, or visible selector—so the next action targets a settled page. Returns on condition met; fails with named error on timeout.
Instructions
Block until a page reaches a known state, so the next tool acts on a settled page rather than a half-loaded one. Waits for the load event, for the URL to contain a string, or for a selector to appear. Returns as soon as the condition holds — {condition, waited} for load, {condition, url} for url, {condition, found} for selector — and fails at the timeout with a named error rather than hanging the client. Polls every 200ms; the default timeout is 10000ms.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tabId | No | Tab to wait on; uses the active tab when omitted | |
| value | No | URL substring or CSS selector to wait for; required for the url and selector conditions | |
| condition | Yes | What to wait for: load (the load event), url (value appears in the URL), or selector (element appears) | |
| timeoutMs | No | Maximum wait in milliseconds (default 10000) |