I.switchTab

Switch to a tab in the browser.

Usage

I.switchTab()
I.switchTab(tab)
Parameter Type Remarks
tab number
string
Optional
Tab to switch to.

If not given, switch to the next tab.
If browser is already on the last tab, switch to the first tab.

If tab is a number, switch using the tab number.
Tab numbers start from 1.

If tab is a text, switch using the page title.

# Switch to next tab

I.switchTab()

Switch to the next tab. If browser is already on the last tab, switch to the first tab.

# Switch to tab number

I.switchTab(1)

Switches to the first tab in the browser.

# Switch to page with title

I.switchTab("Google Search")

Switches to the page titled "Google Search".