net_wait
Wait for a network request matching method, status, or URL substring until timeout. Use it instead of fixed sleeps to synchronize browser actions with actual network activity.
Instructions
Poll captured network requests for the first one matching the given criteria, up to timeoutMs (default 10000ms). Use instead of a fixed sleep to make driving deterministic — wait for the request rather than guessing at timing.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| method | No | e.g. GET, POST | |
| status | No | ||
| sessionId | No | ||
| timeoutMs | No | max time to wait in ms (default 10000, max 300000 = 5 min for slow first-load CDN assets) | |
| urlIncludes | No | substring match against the request url | |
| includeExisting | No | also match requests recorded BEFORE your last action (default false: only requests since the last page_goto/click/eval/… count, so an old polling call can't satisfy the wait) | |
| requireFinished | No | only match once the request has finished (default false) |