Class
BrowserApplication.
Action
Closes either a specified tab or the active tab.
Availability
This function is supported only in scripts that use the Open Agent, and works with the following browsers:
- Mozilla Firefox
- Internet Explorer 7.0 or later
- Google Chrome
Syntax
browserWindow = browserApplication.CloseTab([tab])
Variable
|
Description
|
tab
|
Optional: The tab to close.
LISTITEM.
|
Notes
When several tabs are open,
Internet Explorer only displays some of the tabs and scroll buttons. As a result, only the currently visible tabs work with this method, which affects index semantics. For example, only the currently visible tabs are used with the
LISTITEM tab parameter. Index 1 identifies the first visible tab.
CloseTab returns the active
BrowserWindow after closing the tab.
Example
InternetExplorer.CloseTab()