Wait for page condition
wait_forPause browser automation until specified text, selector, URL condition, or content stability is met.
Instructions
Wait for text, selector, URL substring, selector absence, scoped text, or bounded content stability in the target page.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | No | ||
| scope | No | Scope for textInScope and contentStableMs waits. | |
| tabId | No | Optional Chrome tab id. Defaults to the claimed session tab, then the active tab. | |
| selector | No | ||
| timeoutMs | No | ||
| documentId | No | Exact frame document id returned by list_frames. Omit to target the current top document. | |
| ignoreRoles | No | Computed roles to exclude from scoped snapshots. Compact/main defaults to ["dialog"] when no visible dialog is open. A visible non-modal dialog is included without taking scope; a visible modal takes scope. Pass ["dialog"] or ["alertdialog"] to hide both roles, or [] to include them in the current scope. | |
| textInScope | No | Wait for substring in scoped page text. | |
| urlIncludes | No | ||
| sessionTabId | No | Optional claimed tab session id returned by claim_tab. | |
| selectorAbsent | No | Wait until selector is absent from the document. | |
| contentStableMs | No | Wait until scoped text length is stable for this many milliseconds. | |
| excludeSelectors | No | CSS selectors for subtrees removed from the scoped snapshot. |