Documentation

Looking for something in particular?

Testing Browser Options

Automation supports the testing of different browser options in Chrome and Firefox. This is useful for testing different browser settings such as locale and language.

In general, Automation supports any applicable Chrome or Firefox browser preference. Refer to Chromium Command Line Switches for more information on Chrome options. Additional preferences can be added to the variable using a comma-separated list.

Setup


To test different browser options in Chrome and Firefox, start by adding a corresponding environment variable in Provar Desktop.

To add this environment variable, navigate to the Test Settings view and click the on the Variables subtab. Add a new Variable by clicking the + (New) icon.

On the Variable details screen, you will then enter a name for the variable. This should be _chromeOptions if you are defining a Chrome browser preference or  _firefoxProfilePrefs if you are defining a Firefox browser preference.

Once you have set the Variable Name you can then click OK to save the empty variable or refer to one of the examples below to configure the variable for your use case.

Example 1: Running Chrome in Spanish


The example below shows how to configure the _chromeOptions variable to set the browser language preference to Spanish.

On the Variable details screen, locate your _chromeOptions variable and edit it. If you do not have a _chromeOptions variable, create it now using the steps described in the Setup section above.

On the edit Variable screen for your _chromeOptions variable, set the the Default Value to –lang=es.

Click the OK button to save this change.

To test these settings, make sure that the Web Browser is set to Chrome in the top-right of Provar Desktop.

Running tests in Chrome will then launch the browser in Spanish. Note that, if testing Salesforce pages, the language rendered by Salesforce is based on the user’s locale settings and not the browser language settings.

Example 2: Defining Firefox browser language


Automation also supports the ability to define Firefox browser preferences such as language.

The example below shows how to configure the _firefoxProfilePrefs variable to set the browser language preference.

On the Variable details screen, locate your _firefoxProfilePrefs variable and edit it. If you do not have a _firefoxProfilePrefs variable, create it now using the steps described in the Setup section above.

On the edit Variable screen for your _firefoxProfilePrefs variable, set the the Default Value to intl.accept_languages={lang}, replacing {lang} with the ISO code for the langage to be tested, e.g. es. Additional preferences can be added in a comma-separated list.

Click the OK button to save this change.

To test these settings, make sure that the Web Browser is set to Firefox in the top-right of Provar Desktop.

Running tests in Firefox will then launch the browser in the target language.

Note that, if testing Salesforce pages, the language rendered by Salesforce is based on the user’s locale settings and not the browser language settings.

For a full list of browser preferences and their syntax, you can access this from the browser itself by entering about:config.

Review Provar on G2
Documentation library

Trying to raise a case with our support team?

We use cookies to better understand how our website is used so we can tailor content for you. For more information about the different cookies we use please take a look at our Privacy Policy.

Scroll to Top