ApplicationManager Object (Legacy Mobile Testing)

Applies to TestComplete 15.20, last modified on January 19, 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

The ApplicationManager object provides access to application archive files (.ipa) installed on the iOS device. You can use this object to install or remove applications, obtain the number of applications installed on the device and so on.

To obtain the object in tests, use the Device.ApplicationManager property.

Members

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 Property
Working With Tested iOS Applications (Legacy)

Highlight search results