Browser sync (FR)

Perfecto Command

mobile:browser:sync

Purpose

Verifies that the browser application is running and the page is loaded.

As a best practice, this function should follow a command such as a button click to ensure that the page is loaded following the command. The timeout is performed after the button click, as opposed to the timeout in a button click command, which is performed before the click and waits for the page to load.

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.

Parameters

Name Type Possible Values Description
timeout Integer The time, in seconds, to wait for the page to be loaded. (Default: 60 seconds)

Return Value

None

Exceptions

None

Examples

Copy

Java sample

//declare the Map for script parameters
Map<String, Object> params = new HashMap<>();
    
params.put("timeout", "85");
driver.executeScript("mobile:browser:sync", params)
Copy

C# sample

//declare the Map for script parameters
Dictionary<String, Object> pars = new Dictionary<String, Object>();
 
pars.Add("timeout", "45");
driver.ExecuteScript("mobile:browser:sync", pars);