Test timezone settings with Maestro on BrowserStack
Set the device timezone for a Maestro test on BrowserStack App Automate.
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.
On BrowserStack App Automate, you can set the timezone of the device before your Maestro test starts. Use this setting to verify how your app displays dates and times, handles scheduled events, or formats timestamps for users in different regions.
You set the timezone as a build capability. BrowserStack applies the timezone when the session starts, so you don’t add any step to your flow.
Prerequisites
Before you start, make sure you have the following:
- Your BrowserStack username and access key, available in the Account & Profile section of your dashboard.
- An Android app as an
.apkfile, or an iOS app as an.ipafile. - A Maestro test suite zipped inside a single parent folder, as described in Prepare your Maestro test suite.
Run a Maestro test with a custom timezone
Complete the following steps to run a Maestro test with a custom device timezone:
Upload your app and test suite
Upload your app and your zipped Maestro test suite, then note the app_url and test_suite_url that each response returns. You need both values to start a build. For the upload commands, see Execute Maestro tests.
Run your flow
Run your flow as usual. BrowserStack sets the timezone at the start of the session, before your first command runs. Your flow needs no runScript step and no additional file.
Frequently asked questions
Can I change the timezone partway through a flow?
No. The timezone is a build capability, so BrowserStack applies the timezone when the session starts. To test a different timezone, start a separate build.
Do I need to add a script to my test suite?
No. Unlike camera image injection and audio injection, timezone needs no browserstack_executor.js script in your test suite.
Related topics
- Prepare your Maestro test suite
- Maestro builds API reference
- Test camera image injection with Maestro
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
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!