Browser clean (FR)
Perfecto Command
mobile:browser:clean
Purpose
Clears the browser content. The browser being cleaned is inherited from the Browser open or Browser goto commands.
No validation is performed. The green success status confirmation within the execution report does not validate that the browser was opened; rather, it validates that the native command request was successfully received by the device OS.
Restriction: Google Chrome is supported on Android 4.1 and later. Internet Explorer and Apple Safari
are currently not supported.
Parameters
None
Return Value
"OK" if successful, "Failed" otherwise
Exceptions
None
Examples
Copy
Java sample
//declare the Map for script parameters
Map<String, Object> params = new HashMap<>();
String res = (String) driver.executeScript("mobile:browser:clean", params);
Copy
C# sample
//declare the Map for script parameters
Dictionary<String, Object> pars = new Dictionary<String, Object>();
String res = (String) driver.ExecuteScript("mobile:browser:clean", pars);