DocsNetwork Interceptionbrowser_enable_network_logging

browser_enable_network_logging

Browser Enable Network Logging

Enable or disable network request/response logging for the context. When enabled, all network activity is captured and can be retrieved with get_network_log.

Usage Example

123456789101112
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.enable_network_logging(
context_id=context_id,
enable=True
)

Parameters

Required

context_idstringrequired

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

enablebooleanrequired

Enable (true) or disable (false) network logging for this context

Response

Returns a JSON object with the operation result.

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