ApplicationManager Property

Applies to TestComplete 15.42, last modified on September 08, 2022
The information below concerns legacy mobile tests that work with mobile devices connected to the local computer. For information on the ApplicationManager object available in newer cloud-compatible mobile tests, see the object description.

Description

Returns the ApplicationManager object that provides access to the applications installed on an iOS device.

Declaration

iOSDeviceObj.ApplicationManager

Read-Only Property A ApplicationManager object.
iOSDeviceObj An expression, variable or parameter that specifies a reference to an iOSDevice object

Applies To

The property is applied to the following object:

Property Value

The ApplicationManager object that provides access to the applications installed on the device.

Example

The code below demonstrates how to obtain the ApplicationManager object and use it to install an application on an iOS device:

JavaScript, JScript

function Test()
{
  // Obtain the ApplicationManager object
  var deviceObj = Mobile.Device("iPhone");
  var appManagerObj = deviceObj.ApplicationManager;
  var appPath = "C:\\Work\\MyApp.ipa";

  // Install the application
  var appObj = appManagerObj.InstallApplication(appPath);
  // Launch the application
  appManagerObj.RunApplication(appObj);

  // Remove the application
  appManagerObj.RemoveApplication(appObj);
}

Python

def Test():
  # Obtain the ApplicationManager object
  deviceObj = Mobile.Device("iPhone")
  appManagerObj = deviceObj.ApplicationManager
  appPath = "C:\\Work\\MyApp.ipa"

  # Install the application
  appObj = appManagerObj.InstallApplication(appPath)
  # Launch the application
  appManagerObj.RunApplication(appObj)

  # Remove the application
  appManagerObj.RemoveApplication(appObj)

VBScript

Sub Test
  ' Obtain the ApplicationManager object
  Set deviceObj = Mobile.Device("iPhone")
  Set appManagerObj = deviceObj.ApplicationManager
  appPath = "C:\Work\MyApp.ipa"

  ' Install the application
  Set appObj = appManagerObj.InstallApplication(appPath)
  ' Launch the application
  appManagerObj.RunApplication(appObj)

  ' Remove the application
  appManagerObj.RemoveApplication(appObj)
End Sub

DelphiScript

procedure Test();
var deviceObj, appManagerObj, appObj, appPath;
begin
  // Obtain the ApplicationManager object
  deviceObj := Mobile.Device('iPhone');
  appManagerObj := deviceObj.ApplicationManager;
  appPath := 'C:\Work\MyApp.ipa';

  // Install the application
  appObj := appManagerObj.InstallApplication(appPath);
  // Launch the application
  appManagerObj.RunApplication(appObj);

  // Remove the application
  appManagerObj.RemoveApplication(appObj);
end;

C++Script, C#Script

function Test()
{
  // Obtain the ApplicationManager object
  var deviceObj = Mobile["Device"]("iPhone");
  var appManagerObj = deviceObj["ApplicationManager"];
  var appPath = "C:\\Work\\MyApp.ipa";

  // Install the application
  var appObj = appManagerObj["InstallApplication"](appPath);
  // Launch the application
  appManagerObj["RunApplication"](appObj);

  // Remove the application
  appManagerObj["RemoveApplication"](appObj);
}

See Also

ApplicationManager Object (Legacy Mobile Testing)
iOSDevice Object
Testing iOS Applications (Legacy)

Highlight search results