Testing browser options
Provar supports the testing of different browser options in Chrome and Firefox (Firefox browser preferences are supported as of Provar version 1.9.6). This is useful for testing different browser settings such as locale and language as well as running headless in Chrome. Note that as of Provar version 1.9.8, you can run tests headlessly in Chrome by selecting this in the Web Browser dropdown in the menubar of Provar Desktop.
In general Provar supports any applicable Chrome or Firefox browser preference. Refer to Chromium Command Line Switches for more information on Chrome options.
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 headless
The example below shows how to configure a _chromeOptions variable to run tests headless using Chrome. Note that as of Provar version 1.9.8, you can run tests headlessly in Chrome by selecting this in the Web Browser dropdown in the menubar of Provar Desktop.
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 –headless.
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.
Once this is configured, click the Run or Debug button to execute tests as usual but without launching the Chrome browser.
Note that, if you are running in Test Builder mode, the Chrome browser will ignore any headless setting and launch Chrome browser as usual.
In general Provar supports any applicable Chrome browser preference. Refer to Chromium Command Line Switches for more information on Chrome options. Additional preferences can be added to the _chromeOptions variable using a comma-separated list.
Note that if you are running tests using ANT, the Chrome browser should also be specified to make sure that these settings are applied.
Refer to Ant Task Parameters for more information.
Example 2: 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.
In general Provar supports any applicable Chrome browser preference. Refer to Chromium Command Line Switches for more information on Chrome options. Additional preferences can be added to the _chromeOptions variable using a comma-separated list.
Example 3: Defining Firefox browser language
As of Provar 1.9.6, Provar 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.
In general Provar supports any applicable Firefox browser preference. Additional preferences can be added to the _firefoxProfilePrefsvariable using a comma-separated list.
For a full list of browser preferences and their syntax, you can access this from the browser itself by entering about:config.
- General information
- Licensing Provar
- Provar trial guide and extensions
- Using Provar
- API testing
- Behavior-driven development
- Creating and importing projects
- Creating test cases
- Custom table mapping
- Functions
- Debugging tests
- Defining a namespace prefix on a connection
- Defining proxy settings
- Environment management
- Exporting test cases into a PDF
- Exporting test projects
- Override auto-retry for Test Step
- Managing test steps
- Namespace org testing
- Provar desktop
- Provar Test Builder
- Refresh and Recompile
- Reload Org Cache
- Reporting
- Running tests
- Searching Provar with find usages
- Secrets management and encryption
- Setup and teardown test cases
- Tags and Service Level Agreements (SLAs)
- Test cycles
- Test plans
- Testing browser options
- Tooltip testing
- Using the Test Palette
- Using custom APIs
- Callable tests
- Data-driven testing
- Page objects
- Block locator strategies
- Introduction to XPaths
- Creating an XPath
- JavaScript locator support
- Label locator strategies
- Maintaining page objects
- Mapping non-Salesforce fields
- Page object operations
- ProvarX™
- Refresh and reselect field locators in Test Builder
- Using Java method annotations for custom objects
- Applications testing
- DevOps
- Introduction to test scheduling
- Apache Ant
- Configuration for Sending Emails via the Provar Command Line Interface
- Continuous integration
- AutoRABIT Salesforce DevOps in Provar Test
- Azure DevOps
- Running a Provar CI Task in Azure DevOps Pipelines
- Configuring the Provar secrets password in Microsoft Azure Pipelines
- Parallel Execution in Microsoft Azure Pipelines Using Multiple build.xml Files
- Parallel Execution in Microsoft Azure Pipelines using Targets
- Parallel execution in Microsoft Azure Pipelines using Test Plans
- Bitbucket Pipelines
- CircleCI
- Copado
- Docker
- Flosum
- Gearset DevOps CI/CD
- GitHub Actions
- Integrating GitHub Actions CI to Run Provar CI Task
- Remote Trigger in GitHub Actions
- Parameterization using Environment Variables in GitHub Actions
- Parallel Execution in GitHub Actions using Multiple build.xml Files
- Parallel Execution in GitHub Actions using Targets
- Parallel Execution in GitHub Actions using Test Plan
- Parallel Execution in GitHub Actions using Job Matrix
- GitLab Continuous Integration
- Travis CI
- Jenkins
- Execution Environment Security Configuration
- Provar Jenkins Plugin
- Parallel Execution
- Running Provar on Linux
- Reporting
- Salesforce DX
- Git
- Team foundation server
- Version control
- Salesforce testing
- Adding a Salesforce connection
- Assert Page Error Messages on Add/Edit Product
- Dynamic Forms
- Internationalization support
- List and table testing
- Salesforce Release Updates
- Salesforce Lightning Testing
- Salesforce Lightning Web Component (LWC) locator support
- Salesforce console testing
- Visualforce Testing
- Performance Best Practices
- Testing best practices
- Troubleshooting
- Browsers
- Configurations and permissions
- Connections
- DevOps
- Error messages
- Administrator has blocked access to client
- JavascriptException: Javascript error
- macOS Big Sur Upgrade
- Resolving failed to create ChromeDriver error
- Resolving Jenkins license missing error
- Resolving metadata timeout errors
- Test execution fails – Firefox not installed
- Update to Opportunity field validation behaviour
- Licensing, installation and firewalls
- Memory
- Test Builder and test cases
- Release notes