Skip to main content

Shake Gesture on iOS

Note: The Shake Gesture feature is currently in Beta and may involve changes based on feedback.

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 customGestures 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\": \"customGestures\", \"arguments\": { \"deviceShake\": \"true\" }});
await driver.execute("browserstack_executor: {\"action\": \"customGestures\", \"arguments\": { \"deviceShake\": \"true\" }}”)
((IJavaScriptExecutor)driver).ExecuteScript("browserstack_executor: {\"action\": \"customGestures\", \"arguments\": { \"deviceShake\": \"true\" }}”);
driver.execute_script("browserstack_executor: {\"action\": \"customGestures\", \"arguments\": { \"deviceShake\": \"true\" }}”)
driver.execute_script("browserstack_executor: {\"action\": \"customGestures\", \"arguments\": { \"deviceShake\": \"true\" }}”)

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