Appearance
I.switchTab()
Switches focus to a different browser tab.
Usage
js
I.switchTab()
I.switchTab(index: number)
I.switchTab(title: string)Parameters
| Parameter | Type | Description |
|---|---|---|
index | number | Switch to the tab at the specified position (1-based index) |
title | string | Switch to the tab with the specified page title |
Examples
Switch to next tab
js
I.switchTab()Switches focus to the next available tab. If the current active tab is the last tab, this cycles back to the first (leftmost) tab.
Switch to a tab by index
js
I.switchTab(2)Switches focus to the second tab.
Switch to a tab by page title
js
I.switchTab("Wikipedia")Switches focus to the tab with the page title "Wikipedia".
WARNING
If the tab cannot be found by index or by title, the command will fail.