InstalledApplicationCount Property

Applies to TestComplete 15.48, last modified on March 01, 2023
The information below concerns legacy mobile tests that work with mobile devices connected to the local computer. For new mobile tests, we recommend using the newer cloud-compatible approach.

Description

The InstalledApplicationCount property returns the number of applications installed on the iOS device.

Declaration

ApplicationManagerObj.InstalledApplicationCount

Read-Only Property Integer
ApplicationManagerObj An expression, variable or parameter that specifies a reference to an ApplicationManager object

Applies To

The property is applied to the following object:

Property Value

The number of applications installed on the device.

Example

The following code uses the InstalledApplicationCount property to get the number of applications installed on the device and then posts this number to the test log:

JavaScript, JScript

function Test()
{

  var deviceObj = Mobile.Device("iPhone");
  var appManagerObj = deviceObj.ApplicationManager;
  var count = appManagerObj.InstalledApplicationCount;
  Log.Message("The number of installed applications is: " + aqConvert.VarToStr(count));

}

Python

def Test():
  deviceObj = Mobile.Device("iPhone")
  appManagerObj = deviceObj.ApplicationManager
  count = appManagerObj.InstalledApplicationCount
  Log.Message("The number of installed applications is: " + aqConvert.VarToStr(count))

VBScript

Sub Test

  Set deviceObj = Mobile.Device("iPhone")
  Set appManagerObj = deviceObj.ApplicationManager
  count = appManagerObj.InstalledApplicationCount
  Call Log.Message("The number of installed applications is: " + aqConvert.VarToStr(count))

End Sub

DelphiScript

procedure Test();
var deviceObj, appManagerObj, count;
begin

  deviceObj := Mobile.Device('iPhone');
  appManagerObj := deviceObj.ApplicationManager;
  count := appManagerObj.InstalledApplicationCount;
  Log.Message('The number of installed applications is: ' + aqConvert.VarToStr(count));

end;

C++Script, C#Script

function Test()
{

  var deviceObj = Mobile["Device"]("iPhone");
  var appManagerObj = deviceObj["ApplicationManager"];
  var count = appManagerObj["InstalledApplicationCount"];
  Log["Message"]("The number of installed applications is: " + aqConvert["VarToStr"](count));

}

See Also

ApplicationManager Object (Legacy Mobile Testing)
InstalledApplication Property
ApplicationObject Object

Highlight search results