Device Ready (FR)

Perfecto Command

mobile:handset:ready

Purpose

For iOS and Android devices, the device is unlocked and returned to its default rotate orientation. For example, iPhone devices are returned to portrait mode and iPad devices to landscape mode.

Use this function at the beginning of a script, to ensure a known starting point for the user.

Parameters

Name Type Possible Values Description
target String

all  | menu | position

Specify what should be reset - menu navigation state, device orientation, or both.

all (default) - Reset both location in the navigation tree (device menus to IDLE state) and device state to default (rotate / flip state)

menu - Reset the location in the navigation tree

position - Reset the device state (rotate / flip) to default position

Return Value

None

Exceptions

None

Examples

Copy

Java sample

Map<String, Object> pars = new HashMap<>();
String reStr = (String) driver.executeScript("mobile:handset:ready", pars);
Copy

C# sample

Dictionary<String, Object> pars = new Dictionary<String, Object>();
String reStr = (String) driver.ExecuteScript("mobile:handset:ready", pars);