Skip to main content
Transform your testing process with: Real Device Features, Company-wide Licences, & App Percy

Shake Gesture on iOS

Note: This feature is available only under Device Cloud Pro, Device Cloud Pro + Visual Cloud, and Enterprise Pro plans. For more details check out our pricing page.

Browserstack App Automate enables you to simulate a shake gesture on iOS devices. Some apps require shaking the device to make a switch between production and staging environments, receive popups and notifications, open up a hidden menu etc.

In this guide, you will learn about:

Supported OS and devices

Supported Devices iOS Version
iPhones & iPads 16

Trigger Shake Gesture using custom BrowserStack JavaScript executor

Add the customGesture action in the custom BrowserStack JavaScript executor to simulate a shake on the device in the middle of your test session.

jse.executeScript("browserstack_executor: {\"action\": \"customGesture\", \"arguments\": { \"deviceShake\": \"true\" }});
await driver.execute("browserstack_executor: {\"action\": \"customGesture\", \"arguments\": { \"deviceShake\": \"true\" }}”)
((IJavaScriptExecutor)driver).ExecuteScript("browserstack_executor: {\"action\": \"customGesture\", \"arguments\": { \"deviceShake\": \"true\" }}”);
driver.execute_script("browserstack_executor: {\"action\": \"customGesture\", \"arguments\": { \"deviceShake\": \"true\" }}”)
driver.execute_script("browserstack_executor: {\"action\": \"customGesture\", \"arguments\": { \"deviceShake\": \"true\" }}”)

Check this page for a list of various JavaScript Executors that BrowserStack offers.

We're sorry to hear that. Please share your feedback so we can do better

Contact our Support team for immediate help while we work on improving our docs.

We're continuously improving our docs. We'd love to know what you liked






Thank you for your valuable feedback

Is this page helping you?

Yes
No

We're sorry to hear that. Please share your feedback so we can do better

Contact our Support team for immediate help while we work on improving our docs.

We're continuously improving our docs. We'd love to know what you liked






Thank you for your valuable feedback!

Talk to an Expert
Download Copy