Device Shake (FR)
Perfecto Command
perfecto:handset:shake
Purpose
On iOS: Triggers a virtual shake gesture on the device to activate features or modes that rely on physical shaking, such as entering development or test mode. You can also use it to trigger the React Native development menu in debuggable apps.
On Android: Only triggers the React Native development menu in debuggable apps. This feature requires enablement. To request this feature for your cloud, contact Perfecto Support.
Parameters
None
Return Value
OK
Exceptions
The following exceptions may occur when working with Android devices.
Exception |
Code | Description |
---|---|---|
|
554 |
Thrown if the |
|
1206 |
Thrown if no foreground application is detected |
|
403 |
Thrown if the application currently in the foreground does not support this operation (if it is not a React Native debuggable app) |
Example
Java sample
Map<String, String> params = new HashMap<>();
getDriver().executeScript(“perfecto:handset:shake”, params);