DocsConsole & Debuggingbrowser_get_console_log

browser_get_console_log

Browser Get Console Log

Read console logs from the browser. Returns JavaScript console messages (console.log, console.warn, etc). Supports filtering by level and text. Useful for debugging and monitoring page behavior.

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.get_console_log(
context_id=context_id
)

Parameters

Required

context_idstringrequired

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

Optional

levelstring

Filter by log level: 'debug', 'info', 'warn', 'error', 'verbose'. If not specified, returns all logs

filterstring

Filter logs containing specific text (case-sensitive substring match)

limitstring

Maximum number of log entries to return. If not specified, returns all logs

Response

Returns a JSON object with the operation result.

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