Page tree
Skip to end of metadata
Go to start of metadata

Last updated: Mar 02, 2021 12:32

Perfecto Command

mobile:application:install

Purpose

To use, the application must first be uploaded to the Lab repository. PerfectoLabUtils class provides the uploadMedia method to upload a file to the Repository.

The Install application function performs the same operation as the Install widget in Interactive (see Manage apps).

For Android devices:
- The appplication manifest.xml file must include internet access permission:
<uses-permission android:name="android.permission.INTERNET"/>
- The application will automatically be signed with an Android debug key to enable native object automation.

Parameters

NameTypePossible ValuesDescription
file (Mandatory)Multimedia
The full repository path, including directory and file name, where to locate the application.
Example -
PRIVATE:dir1/dir2/name.apk
instrumentStringnoinstrument | instrument
Perform instrumentation.
instrument - perform Object tree instrumentation
noinstrument (default) - no instrumentation performed, use visual analysis to identify DOM objects.
sensorInstrumentStringnosensor | sensor
Enable device sensor (for example camera or fingerprint) data input for the application.
sensor- sensor reads data from the appropriate injection command
nosensor (default) - sensors are not primed for program input.
certificate.fileMultimedia
The repository path, including directory and file name, of the certificate for certifying the application after instrumentation. This is the Keystore file in Android devices.
Example - PRIVATE:dir1/dir2/name.jks
certificate.userString
The user for certifying the application after instrumentation. The user can be encoded, click here for more details on the String Encoder. This is the Key Alias in Android devices.
The user can be encoded, click here for more details on the String Encoder.
certificate.passwordString
The password for certifying the application after instrumentation. This is the Keystore Password in Android devices.
The password can be encoded, click here for more details on the String Encoder.
certificate.paramsString
The key password parameter for certifying the application after instrumentation. This is the Key Password in Android devices.
The value must be preceded with "keypass".
The param can be encoded, click here for more details on the String Encoder.
Example - keypass 3f51s6

Note: The certificate.x parameters are relevant for Android devices only. And used only if the instrumentation parameter is set to instrument.


Return Value

None

Exceptions

None

Examples

Java sample
//declare the Map for script parameters
Map<String, Object> params = new HashMap<>();
 
params.put("file", "PRIVATE:applications/Errands.ipa");
params.put("instrument", "noinstrument");
driver.executeScript("mobile:application:install", params); 
C# sample
//declare the Map for script parameters
Dictionary<String, Object> pars = new Dictionary<String, Object>();
 
pars.Add("file", "PRIVATE:applications/Errands.ipa");
pars.Add("instrument", "noinstrument");
driver.ExecuteScript("mobile:application:install", pars);