For AI agents: a documentation index is available at /llms.txt
Skip to main content

switchToWindow

Switches context to a popup window matching specified criteria

switchToWindow(
url: String
title: String
newest: Boolean = false
timeout: Float = 5000
waitUntil: WaitUntilGoto
): SwitchWindowResponse

Arguments​

switchToWindow.url ● String scalar​

URL pattern to match against window URLs (supports wildcards)

switchToWindow.title ● String scalar​

Window title pattern to match

switchToWindow.newest ● Boolean scalar​

Whether to target most recently opened window

switchToWindow.timeout ● Float scalar​

Maximum time to wait for matching window (in milliseconds)

switchToWindow.waitUntil ● WaitUntilGoto enum​

When to consider the page fully-loaded and proceed with further execution

Type​

SwitchWindowResponse object​

Response from window switching operation

Was this page helpful?