wait_for_network_idle
Wait until all network requests settle and the document is fully loaded, solving flaky automation in SPAs with async data. Configure idle time, timeout, and tolerated in-flight requests.
Instructions
Wait until there are no active XHR/fetch requests for a quiet period. Essential for SPAs and pages that load data asynchronously. Also waits for document.readyState to be 'complete'.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| timeout | No | Max seconds to wait before giving up | |
| idle_time_ms | No | Milliseconds of network silence required | |
| max_inflight | No | Tolerate up to N in-flight requests (0 = fully idle) |