Browsers.Item Property

Applies to TestComplete 15.64, last modified on June 12, 2024


Use this property to obtain information about a particular browser installed on the current computer.

Note: To get access to a web browser running on a remote computer or remote mobile device, use the Browsers.RemoteItem property.


Browsers.Item(Index, Version, Platform)

Read-Only Property A BrowserInfo object
Index [in]    Required    Variant    
Version [in]    Optional    String Default value: Empty string   
Platform [in]    Optional    Integer Default value: pAny   

Applies To

The property is applied to the following object:


The property has the following parameters:


Specifies the browser instance you want to get. A browser can be specified via built-in constant, by the process name or by index within the collection:


When specifying a browser via constant, the following values are acceptable:

Constant Value Description
btIExplorer -1 Microsoft Internet Explorer.
btFirefox -2 Mozilla Firefox.
btChrome -3 Google Chrome.
btEdge -6 Microsoft Edge.

When specifying a browser by its process name, the following values are acceptable: "firefox", "iexplore", "edge", and "chrome". The process names coincide with the values of ProcessName property of the respective Browser process.

When specifying a browser by its collection index, keep in mind that the first item in the collection has index 0, the second - 1, and so on. The total number of items in the collection is specified by the Browsers.Count property.


A string that specifies the version of a browser instance to be obtained. The string may contain various combinations of digits and separator character. For example, all the following strings are valid values for the Version parameter: "3", "16.", "3.6.", "3.6.28", "9.0.8112.16421".


An integer indicating the platform of a browser instance to be obtained. Can have one of the following values:

Constant Value Description
pX86 0 A 32-bit version of the browser executable.
pX64 1 A 64-bit version of the browser executable.
pAny -1 Any available version of the browser executable.

If you have both 32- and 64-bit versions, the 32-bit version will be used.

If you specify a value for the Platform parameter, you will have to specify values for all three parameters. If the Version parameter is not important for you, you can specify an empty string as its value.

Property Value

A BrowserInfo object that provides scripting interface to the desired browser instance. If the Browsers collection does not contain an object with the specified index, name, version or platform TestComplete posts an error message to the test log.


If your tests uninstall or install browsers during the run, call the Browsers.Refresh method to update the Browsers collection after the installation or uninstallation is over. This should be done before you continue working with the browsers.


The following routine uses the properties and methods of Browsers and BrowserInfo objects to list all installed and supported browsers.

JavaScript, JScript

function ListBrowsers()
  var browser;
  for (var i=0; i < Browsers.Count; i++)
    browser = Browsers.Item(i);
    Log.Message("Browser " + aqConvert.IntToStr(i) + " : " + browser.Description);


def ListBrowsers():
  for i in range (0, Browsers.Count-1):
    browser = Browsers.Item(i); 
    Log.Message("Browser " + aqConvert.IntToStr(i) + " : " + browser.Description);


Sub ListBrowsers
  Dim browser
  For i = 0 To Browsers.Count-1
    Set browser = Browsers.Item(i)
    Log.Message("Browser " + aqConvert.IntToStr(i) + " : " + browser.Description)
End Sub


procedure ListBrowsers;
  browser, i : OleVariant;
  for i:=0 to Browsers.Count-1 do 
    browser := Browsers.Item(i);
    Log.Message('Browser ' + aqConvert.IntToStr(i) + ' : ' + browser.Description);

C++Script, C#Script

function ListBrowsers()
  var browser;
  for (var i=0; i < Browsers["Count"]; i++)
    browser = Browsers["Item"](i);
    Log["Message"]("Browser " + aqConvert["IntToStr"](i) + " : " + browser["Description"]);

For more examples of using this property, see Launch Web Browsers, Parameterizing the Browser for a Test Run and Running Tests in Multiple Browsers topics.

See Also

Browsers Object
Run Method
Navigate Method
RemoteItem Property

Highlight search results