Skip to main content
No Result Found

Supported commands on Maestro

View all supported commands to run Maestro tests on Android and iOS devices using BrowserStack App Automate

Here is a list of supported commands on Maestro:

Command name Supported on Android Supported on iOS
assertVisible Yes Yes
assertNotVisible Yes Yes
assertTrue Yes Yes
copyTextFrom Yes Yes
evalScript Yes Yes
eraseText Yes Yes
extendedWaitUntil Yes Yes
inputText Yes Yes
killApp Yes Yes
launchApp Yes Yes
pressKey Yes Yes
pasteText Yes Yes
repeat Yes Yes
retry Yes Yes
runFlow Yes Yes
runScript Yes Yes
scroll Yes Yes
scrollUntilVisible Yes Yes
stopApp Yes Yes
swipe Yes Yes
takeScreenshot No Yes
tapOn Yes Yes
doubleTapOn Yes Yes
longPressOn Yes Yes
waitForAnimationToEnd Yes Yes
addMedia Yes No
back Yes No
clearState Yes No
hideKeyboard Yes No
openLink Yes No
travel Yes No
calendar Yes No
camera Yes No
location Yes No
medialibrary Yes No
notifications Yes No
microphone Yes No
bluetooth Yes No
phone Yes No
storage Yes No
sms Yes No
my.custom.permission Yes No

Workarounds for unsupported maestro commands using BrowserStack API

While some Maestro commands are not supported on BrowserStack, you can achieve the same functionality using BrowserStack’s APIs as shown below. Select the OS of your device:

Unsupported command Alternative via BrowserStack API Example cURL command
addMedia Use Upload Media API curl -u “USERNAME:ACCESS_KEY” -X POST “https://api-cloud.browserstack.com/app-automate/upload-media” -F “file=@/path/to/image.png” -F “custom_id=SampleMedia”
setLocation Use gpsLocation in your build payload curl -u “USERNAME:ACCESS_KEY” -X POST “https://api-cloud.browserstack.com/app-automate/maestro/v2/android/build” -d ‘{“gpsLocation”: “40.730610,-73.935242”, “devices”: [“Samsung Galaxy S8-7.0”], “app”: “bs://APP_ID”, “testSuite”: “bs://TEST_SUITE_ID”}’ -H “Content-Type: application/json”
setAirplaneMode or toggleAirplaneMode Use networkProfile: "no-network" in your payload curl -u “USERNAME:ACCESS_KEY” -X POST “https://api-cloud.browserstack.com/app-automate/maestro/v2/android/build” -d ‘{“networkProfile”: “no-network”, “devices”: [“Samsung Galaxy S8-7.0”], “app”: “bs://APP_ID”, “testSuite”: “bs://TEST_SUITE_ID”}’ -H “Content-Type: application/json”
Unsupported command Alternative via BrowserStack API Example cURL command
addMedia Use Upload Media API curl -u “USERNAME:ACCESS_KEY” -X POST “https://api-cloud.browserstack.com/app-automate/upload-media” -F “file=@/path/to/image.png” -F “custom_id=SampleMedia”
setLocation Use gpsLocation in your build payload curl -u “USERNAME:ACCESS_KEY” -X POST “https://api-cloud.browserstack.com/app-automate/maestro/v2/ios/build” -d ‘{“gpsLocation”: “40.730610,-73.935242”, “devices”: [“iPhone 15-17.0”], “app”: “bs://APP_ID”, “testSuite”: “bs://TEST_SUITE_ID”}’ -H “Content-Type: application/json”
setAirplaneMode or toggleAirplaneMode Use networkProfile: "no-network" in your payload curl -u “USERNAME:ACCESS_KEY” -X POST “https://api-cloud.browserstack.com/app-automate/maestro/v2/ios/build” -d ‘{“networkProfile”: “no-network”, “devices”: [“iPhone 15-17.0”], “app”: “bs://APP_ID”, “testSuite”: “bs://TEST_SUITE_ID”}’ -H “Content-Type: application/json”

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 Check Circle