page_wait_for
Wait until a page condition is met: selector or text appears, URL contains a string, or network goes idle. Returns immediately once any condition holds, avoiding fixed sleeps.
Instructions
Wait until the page reaches a condition instead of sleeping: a CSS selector appears, some text appears, the URL contains a string, or the network has been idle for N ms. Any one condition satisfies it (they OR together). Returns as soon as it holds — use this (or net_wait) rather than fixed waits.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | wait until the page URL contains this substring | |
| text | No | wait until this text appears anywhere in the page | |
| selector | No | wait until this CSS selector matches an element | |
| sessionId | No | ||
| timeoutMs | No | give up after this many ms (default 10000) | |
| networkIdleMs | No | wait until no new requests/console output for this many ms AND nothing started since your last action is still awaiting a response (requests older than 5 s — long-polls, streams, hung calls — do not block) |