BrowserInfo Object

Applies to TestComplete 14.30, last modified on November 21, 2019

Description

The BrowserInfo object describes one of the supported browsers installed on the current computer. The properties and methods of this object provide information about the browser and allow you to launch this browser from tests.

To work with the entire list of the available browsers, use the Browsers object. To get the BrowserInfo object as an item of this list, use the Browsers.Item or Browsers.CurrentBrowser property.

Members

Example

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);
  }
}

Python

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

VBScript

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

DelphiScript

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

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"]);
  }
}

See Also

Testing Web Applications
Browsers Object

Highlight search results