browser_wait_for_dialog
Browser Wait For Dialog
Wait for a JavaScript dialog to appear. Blocks until a dialog shows up or timeout expires. Useful when you know an action will trigger a dialog and need to handle it specifically.
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_dialog(
context_id=context_id
)
Parameters
Required
context_idstringrequiredThe unique identifier of the browser context (e.g., 'ctx_000001')
Optional
timeoutstringMaximum time to wait for a dialog to appear in milliseconds. Returns error if no dialog appears. Default: 5000 (5 seconds)
Response
Returns a JSON object with the operation result.
{
"success": true,
"result": <value>
}