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

Last updated: Mar 30, 2017 13:16

Perfecto Command

mobile:browser:clean

Purpose

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.

Note: The supported browser needs to be open and "on top" of the device screen.

How it works

Chrome: Supported from Android 4.1. Cleans all data and opens a Chrome Terms and Services page that needs a manual click to accept. After running Browser clean, the Webpage functions do not work because the Chrome Terms and Services agreement does not load as a regular web page.

Safari: Not currently supported.

Internet Explorer: Not currently supported.

Parameters

None

Return Value

"OK" if successful, "Failed" otherwise

Exceptions

None

Examples

Java sample
//declare the Map for script parameters
Map<String, Object> params = new HashMap<>();

String res = (String) driver.executeScript("mobile:browser:clean", params); 
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);