DocsWait Utilitiesbrowser_wait_for_network_idle

browser_wait_for_network_idle

Browser Wait For Network Idle

Wait until there are no pending network requests for a specified duration. The most reliable way to wait for a page to fully load, including AJAX requests, images, and dynamic content.

Usage Example

1234567891011
import asyncio
from owl_browser import OwlBrowser, RemoteConfig
# Async usage
async with OwlBrowser(config) as browser:
context = await browser.create_context()
context_id = context["context_id"]
await browser.wait_for_network_idle(
context_id=context_id
)

Parameters

Required

context_idstringrequired

The unique identifier of the browser context (e.g., 'ctx_000001')

Optional

idle_timestring

Duration of network inactivity (no pending requests) required to consider the page 'idle'. Default: 500ms. Increase for pages with delayed/lazy loading

timeoutstring

Maximum time to wait for network idle state. Returns error if network doesn't become idle within this time. Default: 30000 (30 seconds)

Response

Returns a JSON object with the operation result.

{
  "success": true,
  "result": <value>
}