This article explains how to override the default settings for browser locale and timezone in cloud runs, local runs, and training sessions.
When you train and run mabl tests locally, the test inherits the default locale and timezone from the operating system that it runs on. However, when you run tests in the cloud, mabl sets the browser's locale to en-US (American English) and sets the timezone to UTC+0
.
Setting a specific browser locale and/or timezone is useful for:
- Multi-locale testing
- Reducing discrepancies in test behavior during training and execution
For example, if you are testing a restaurant delivery application in Japan, you can set the locale to ja
and the timezone to UTC+9
for plan runs to make sure prices and delivery times are consistent during training and execution.
Browser locales are a combination of language and regional identifiers that can affect the language used by webpages and the displayed values for currencies, date formats, and numbers.
For example, a storefront might change its language depending on a user's browser locale:
- Accessing the page with a locale of
en-US
oren-GB
may both display the chosen language as English, but change the displayed currency to US Dollars or British pounds depending on the locale. - Accessing the page with a locale of
ja
may default the chosen language to Japanese and the chosen currency to Yen.
Cloud runs
Plan runs
To edit the browser locale and timezone for a specific plan, take the following steps:
- Click on the pencil icon on the plan details page
- In the Device Settings section, click on Additional settings
- Select the desired browser locale and/or timezone from the dropdowns.
- Save your plan.
Setting browser locale and timezone for plan runs
Ad hoc runs
To edit the browser locale and timezone for ad hoc cloud runs, take the following steps:
- On the test details page, click on the Run test button.
- On the Cloud run tab, toggle on "Customize localization options"
- Select the desired browser locale and/or timezone from the dropdowns.
- Click on the Start run button.
Setting browser locale and timezone for ad hoc cloud runs
Local runs and training sessions
To set the browser locale and/or timezone for local runs and training sessions in the mabl Trainer, use the preferences menu:
- Go to Edit > Preferences.
- Click on the Browser tab.
- Select the desired browser locale and/or timezone from the dropdowns.
- Save your settings.
Editing locale and time zone settings in the Desktop App
Test runs initiated via the CLI
To set the browser locale and/or timezone for tests initiated using the mabl CLI, use the --locale
or --timezone-id
flag with the mabl tests run
or mabl tests run-cloud
commands.