Setting browser locale and timezone

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.

📘

What is browser locale?

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 or en-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:

  1. Click on the pencil icon on the Plan Details page
  2. In "Device Settings" click on "Additional settings"
  3. Select the desired browser locale and/or timezone from the dropdowns.
  4. Save your plan.
Setting browser locale and timezone for plan runs

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:

  1. On the Test Details page, click on the "Run test" button.
  2. On the "Cloud run" tab, toggle on "Customize localization options"
  3. Select the desired browser locale and/or timezone from the dropdowns.
  4. Click on the "Start run" button.
Setting browser locale and timezone for ad hoc cloud runs

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:

  1. Go to Edit > Preferences.
  2. Click on the "Browser" tab.
  3. Select the desired browser locale and/or timezone from the dropdowns.
  4. Save your settings.
Editing locale and time zone settings in the Desktop App

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.