Process Method

Applies to TestComplete 15.63, last modified on April 23, 2024
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

Returns the AndroidProcess object that corresponds to the package that is currently running on the device.

TestComplete recognizes processes of only those applications that were prepared for testing in a special way. For more information, see Preparing Android Applications (Legacy).

Declaration

AndroidDeviceObj.Process(ProcessName)

AndroidDeviceObj An expression, variable or parameter that specifies a reference to an AndroidDevice object
ProcessName [in]    Required    String    
Result An AndroidProcess object

Applies To

The method is applied to the following object:

Parameters

The method has the following parameter:

ProcessName

The package name of the Android application, for example, com.example.orders. The process name is case-insensitive.

You can use wildcards (* and ?) to search by a partial name like *.orders.

Result Value

An AndroidProcess object that corresponds to the specified process.

Example

The code below obtains the process by its name:

JavaScript, JScript

function GetProcess()
{
  var proc = Mobile.Device("MyDevice").Process("com.example.orders");
}

Python

def GetProcess():
  proc = Mobile.Device("MyDevice").Process("com.example.orders")

VBScript

Sub GetProcess
  Set proc = Mobile.Device("MyDevice").Process("com.example.orders")
End Sub

DelphiScript

procedure GetProcess();
var proc;
begin
  proc := Mobile.Device('MyDevice').Process('com.example.orders');
end;

C++Script, C#Script

function GetProcess()
{
  var proc = Mobile["Device"]("MyDevice")["Process"]("com.example.orders");
}

See Also

Addressing Objects in Android Open Applications (Legacy)
Testing Android Applications (Legacy)
ProcessName Property
AndroidDevice Object
WaitProcess Method
Process Method (iOS Testing)

Highlight search results