DocsWait Utilitiesbrowser_wait_for_url

browser_wait_for_url

Browser Wait For Url

Wait for the page URL to match a specific pattern. Useful after clicking links or submitting forms to ensure navigation completed. Supports substring matching or glob patterns with wildcards.

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.wait_for_url(
context_id=context_id,
url_pattern="value"
)

Parameters

Required

context_idstringrequired

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

url_patternstringrequired

URL pattern to match. By default uses substring matching. With is_regex=true, supports glob patterns with * (any chars) and ? (single char). Examples: '/dashboard', 'example.com/success', '*/order/*'

Optional

is_regexboolean

Enable glob-style pattern matching with * and ? wildcards. Default: false (simple substring match)

timeoutstring

Maximum time to wait for URL to match. Default: 30000 (30 seconds)

Response

Returns a JSON object with the operation result.

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