DocsTab Managementbrowser_switch_tab

browser_switch_tab

Browser Switch Tab

Switch focus to a specific tab by its ID. The tab becomes the active tab, and subsequent browser operations will interact with that tab's content. Other tabs continue running in the background.

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

Parameters

Required

context_idstringrequired

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

tab_idstringrequired

The unique identifier of the tab to activate/switch to, obtained from browser_get_tabs

Response

Returns a JSON object with the operation result.

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