AppInfo.name Property

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

Description

The Name property returns the application name as it is specified in the XUL application packaging.

Declaration

AppInfo.name

Read-Only Property String

Applies To

The property is applied to the following object:

Property Value

A string that holds the application name.

Example

The code below obtains the name of the application that corresponds to the firefox process and posts this name to the test log.

JavaScript, JScript

function AppName()
{
  // 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 name
  // and posts it to the test log
  var aName = AppInfo.Name;
  Log.Message("Application name: " + aName);
}

Python

def AppName():
  # 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 name
  # and posts it to the test log
  aName = AppInfo.Name
  Log.Message("Application name: " + aName)

VBScript

Sub AppName
  ' 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 name
  ' and posts it to the test log
  aName = AppInfo.Name
  Log.Message("Application name: " & aName)
End Sub

DelphiScript

function AppName;
var Proc, AppInfo, aName;
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 name
  // and posts it to the test log
  aName := AppInfo.Name;
  Log.Message('Application name: ' + aName);
end;

C++Script, C#Script

function AppName()
{
  // 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 name
  // and posts it to the test log
  var aName = AppInfo["Name"];
  Log["Message"]("Application name: " + aName);
}

Highlight search results