switch_tab
Makes the tab at a given index the active tab so subsequent navigate, evaluate, screenshot, click, and type calls target it, and brings it to the front in Chrome.
Instructions
Make the tab at tabIndex the active tab, so later navigate/evaluate/screenshot/click/type calls target it, and bring it to the front in Chrome (the human-takeover live view follows it too). Use new_page to open a tab instead, and pass tabIndex straight to evaluate or the profiling tools to act on another tab without switching. Indices come from list_pages and shift when a tab closes, so list again if unsure. Fails if the session has no tab at that index.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tabIndex | Yes | A tab's 0-based index from list_pages. Errors if the session has no tab at that index. | |
| sessionId | Yes | The id returned by open_browser_session. Errors if no open session has it. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | ||
| index | Yes | The tab's 0-based list_pages index. |