Uninstall application (FR)
Perfecto Command
mobile:application:uninstall
Purpose
Removes a single application from the device. You can remove a single application or all applications from the device, returning the device to its out-of-the-box state. For more information on removing all applications, refer to the Uninstall applications command.
To use this command, an application identifier is required. For information on retrieving the application identifier, see Application identifier.
Restriction: Pre-installed (system) applications cannot be uninstalled.
Parameters
Name | Type | Possible Values | Description |
---|---|---|---|
name | String | The application name as it is displayed on the device screen. | |
identifier | String | The identifier of the application. |
Return Value
String - "OK" or "Failed"
Exceptions
None
Examples
Copy
Java sample
//declare the Map for script parameters
Map<String, Object> params = new HashMap<>();
params.put("identifier", "com.google.android.apps.keep");
String res = (String) driver.executeScript("mobile:application:uninstall", params);
Copy
C# sample
//declare the Map for script parameters
Dictionary<String, Object> pars = new Dictionary<String, Object>();
pars.put("identifier", "com.google.android.apps.keep");
driver.executeScript("mobile:application:uninstall", pars);