wait_for_network_idle
Wait for all network requests to complete before proceeding. Solves timing issues in single-page apps by monitoring XHR/fetch activity until a quiet period is detected.
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 |
|---|---|---|---|
| idle_time_ms | No | Milliseconds of network silence required | |
| timeout | No | Max seconds to wait before giving up | |
| max_inflight | No | Tolerate up to N in-flight requests (0 = fully idle) |