AppInfo.ID Property

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

Description

The ID property returns a unique number that identifies the application.

Declaration

AppInfo.ID

Read-Only Property String

Applies To

The property is applied to the following object:

Property Value

A string that holds the application identifier.

Example

The code below obtains the unique identifier of the process that corresponds to the firefox process and then posts this identifier to the test log.

JavaScript, JScript

function AppId()
{
  // Launches the Firefox web browser and obtains the process
  Browsers.item(btFirefox).Run("about:blank");
  var firefox = Sys.Browser("firefox");
  // Obtains information about the application
  var AppInfo = firefox.AppInfo;
  
  // Obtains the application's identifier
  // and posts it to the test log
  var aID = AppInfo.ID;
  Log.Message("Application identifier: " + aID);
}

Python

def AppId():
  # Launches the Firefox web browser and obtains the process
  Browsers.item[btFirefox].Run("about:blank")
  firefox = Sys.Browser("firefox")
  # Obtains information about the application
  AppInfo = firefox.AppInfo
  
  # Obtains the application"s identifier
  # and posts it to the test log
  aID = AppInfo.ID
  Log.Message("Application identifier: " + aID)

VBScript

Sub AppId
  ' Launches the Firefox web browser and obtains the process
  Browsers.item(btFirefox).Run("about:blank")
  Set firefox = Sys.Browser("firefox")
  ' Obtains information about the application
  Set AppInfo = firefox.AppInfo
  
  ' Obtains the application's identifier
  ' and posts it to the test log
  aID = AppInfo.ID
  Log.Message("Application identifier: " & aID)
End Sub

DelphiScript

function AppId;
var firefox, AppInfo, aID;
begin
  // Launches the Firefox web browser and obtains the process
  Browsers.item(btFirefox).Run('about:blank');
  firefox := Sys.Browser('firefox');
  // Obtains information about the application
  AppInfo := firefox.AppInfo;
  
  // Obtains the application's identifier
  // and posts it to the test log
  aID := AppInfo.ID;
  Log.Message('Application identifier: ' + aID);
end;

C++Script, C#Script

function AppId()
{
  // Launches the Firefox web browser and obtains the process
  Browsers["item"](btFirefox)["Run"]("about:blank");
  var firefox = Sys["Browser"]("firefox");
  // Obtains information about the application
  var AppInfo = firefox["AppInfo"];
  
  // Obtains the application's identifier
  // and posts it to the test log
  var aID = AppInfo["ID"];
  Log["Message"]("Application identifier: " + aID);
}

See Also

version Property

Highlight search results