GetSelectedTabIndex Function

Class

BrowserApplication.

Action

Returns the index identifier of the currently selected tab (starting with 1).

Availability

This function is supported only in scripts that use the Open Agent, and works with Mozilla Firefox or Internet Explorer version 7 or later.

Syntax

iIndex = browser.GetSelectedTabIndex()
Variable Description
iIndex The index of the current tab. INTEGER.

Notes

GetSelectedTabIndex returns the index identifier of the currently selected tab in the browser.

When several tabs are open, Internet Explorer only displays some of the tabs and scroll buttons. As a result, GetSelectedTabIndex only returns the index relative to the currently visible tabs. Index 1 identifies the first visible tab.

Example

Verify(browser.GetSelectedTabIndex(), 4)