Clean Device (FR)

Perfecto Command

mobile:handset:clean

Purpose

When a "deep clean" is selected, it removes all installed applications, all user data, and all installed files from the device. If the Clean Chrome parameter is selected, it resets the Chrome history on the device.

On iOS devices, this command only removes user-installed applications.

Parameters

Name

Value

Default

Description

deviceID*

   

The device for this command.

content

applications (Basic)

all (Deep)

bookmarks ()

calendar ()

messages ()

mms ()

Basic

Selects whether to perform 'basic' or 'deep' cleaning. Basic clean removes installed applications. Deep cleaning also removes user data.

* Mandatory parameter

Return Value

None

Exceptions

None

Examples

Copy

Java sample

Map<String, Object> pars = new HashMap<>();
pars.put("content", "all"); //Deep cleaning
driver.executeScript("mobile:handset:clean", pars);
Copy

C# sample

Dictionary<String, Object> pars = new Dictionary<String, Object>();
pars.Add("content", "all");//Deep cleaning
String reStr = (String) driver.ExecuteScript("mobile:handset:clean", pars);