Browser open (FR)
Perfecto Command
mobile:browser:open
Purpose
Parameters
Name | Type | Possible Values | Description |
---|---|---|---|
automation | String | simulated | os | chrome | safari |
The automation mode for web applications. Simulated (Default) - open the browser set as default on the device OS - DOM object supported browser. Safari for iOS, Chrome for Android. Select the OS option to use the real DOM on native browsers. When using this option, the system will ensure that only one tab is opened. |
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<>();
params.put("automation", "os");
String res = (String) driver.executeScript("mobile:browser:open", params);
Copy
C# sample
//declare the Map for script parameters
Dictionary<String, Object> pars = new Dictionary<String, Object>();
pars.Add("automation", "safari");
String res = (String) driver.ExecuteScript("mobile:browser:open", pars);