AppInfo Object

Applies to TestComplete 15.70, last modified on December 17, 2024

Description

The AppInfo object provides information about Mozilla applications. It implements the nsIXULAppInfo interface. To obtain the object use the AppInfo extended property of a process that corresponds to a Mozilla application: Firefox, Thunderbird, or any other. This property is available if the Firefox Support plugin is installed.

Members

Example

The code below demonstrates how to get access to an application’s unique identifier and version.

JavaScript, JScript

function AppInfoExample()
{

  // Launches the Firefox web browser and obtains information about the application
  Browsers.Item(btFirefox).Run("about:blank");
  var firefox = Sys.Browser("firefox");
  var AppInfo = firefox.AppInfo;

  // Obtains the application's version and ID
  // and posts them to the test log
  var aVer = AppInfo.Version;
  var aID = AppInfo.ID;
  Log.Message("Application version: " + aVer);
  Log.Message("Application's unique identifier: " + aID);

}

Python

def AppInfoExample():

  # Launches the Firefox web browser and obtains information about the application
  Browsers.Item[btFirefox].Run("about:blank")
  firefox = Sys.Browser("firefox")
  AppInfo = firefox.AppInfo

  # Obtains the application"s version and ID
  # and posts them to the test log
  aVer = AppInfo.Version
  aID = AppInfo.ID
  Log.Message("Application version: " + aVer)
  Log.Message("Application""s unique identifier: " + aID)

VBScript

Sub AppInfoExample

  ' Launches the Firefox web browser and obtains information about the application
  Browsers.Item(btFirefox).Run("about:blank")
  Set firefox = Sys.Browser("firefox")
  Set AppInfo = firefox.AppInfo

  ' Obtains the application's version and ID
  ' and posts them to the test log
  aVer = AppInfo.Version
  aID = AppInfo.ID
  Log.Message("Application version: " & aVer)
  Log.Message("Application's unique identifier: " & aID)

End Sub

DelphiScript

procedure AppInfoExample();
var firefox, AppInfo, aVer, aID;
begin

  // Launches the Firefox web browser and obtains information about the application
  Browsers.Item(btFirefox).Run('about:blank');
  firefox := Sys.Browser('firefox');
  AppInfo := firefox.AppInfo;

  // Obtains the application's version and ID
  // and posts them to the test log
  aVer := AppInfo.Version;
  aID := AppInfo.ID;
  Log.Message('Application version: ' + aVer);
  Log.Message('Application''s unique identifier: ' + aID);

end;

C++Script, C#Script

function AppInfoExample()
{

  // Launches the Firefox web browser and obtains information about the application
  Browsers["Item"](btFirefox)["Run"]("about:blank");
  var firefox = Sys["Browser"]("firefox");
  var AppInfo = firefox["AppInfo"];

  // Obtains the application's version and ID
  // and posts them to the test log
  var aVer = AppInfo["Version"];
  var aID = AppInfo["ID"];
  Log.Message("Application version: " + aVer);
  Log.Message("Application's unique identifier: " + aID);

}

See Also

Process Object
AppInfo Property
Preferences Object

Highlight search results