Preparing Firefox for Web Testing

Applies to TestComplete 15.47, last modified on January 20, 2023

This topic describes Firefox settings required by TestComplete for automated web testing. Make sure you have configured Firefox in this way on all the computers where you are going to record and run tests.

If you use multiple user accounts for testing purposes on your computer, make sure all account-specific browser options are set for each account.

Disable content process sandboxing

If you are facing an issue with TestComplete being not able to record user actions over web pages in Firefox or to access Page objects in this web browser, you may need to configure your system to disable sandbox in Firefox. To do this, create a MOZ_DISABLE_CONTENT_SANDBOX Windows environment variable and set its value to 1.

View instructions

Disable Site Isolation

Starting from version 94, Firefox implements a new Site Isolation Security Architecture. If Site Isolation is enabled in Firefox, TestComplete may fail to record or simulate user actions over web pages correctly, or TestComplete or Firefox may exit unexpectedly during test runs.

To avoid possible issues, we recommend that you disable Site Isolation.

View instructions

Additional Recommended Browser Settings

Disable Automatic Updates

New versions of Firefox are released frequently. If the browser’s auto-update feature is enabled, it can automatically upgrade Firefox to a version that is not yet supported by TestComplete.

To avoid this, we recommended that you disable the browser’s auto-update feature on the test machine and install the latest Firefox version that is supported by your TestComplete version manually.

To disable the auto-update feature:

  1. Click on the Firefox toolbar.

  2. Select Options from the main menu of Firefox.

  3. Scroll to the Firefox Updates block.

  4. Select the Check for updates, but let me choose whether to install them radio button.

To learn which Firefox versions are supported by TestComplete, go to the Mozilla Firefox Patches page.

Disable Unnecessary Add-ons

Some add-ons (for example, the Softonic Toolbar and Flash Debugger add-ons) may cause unexpected behavior of the browser, or even modify network traffic, which will not allow you to perform automated web testing. So, we recommended that you disable all third-party add-ons unless they are required for testing.

To disable add-ons:

  1. Click on the Firefox toolbar.

  2. Select Add-ons from the main menu of Firefox.

  3. Select the Extensions or Plugins page.

  4. Select an add-on and click the Disable button.

For detailed instructions, see http://support.mozilla.org/en-US/kb/disable-or-remove-add-ons.

Browser Settings

We also recommend that you configure certain Firefox settings as described below. While these settings are not necessarily required for automated testing, using them will help you avoid unexpected browser-specific warnings and improve Firefox performance during test recording and test run.

Settings You Configure Manually

To configure the following Firefox settings, type about:config in Firefox’s address bar and press Enter. To find a specific option quickly, type its name in the Search box. If the specific option does not exist, you can create it by right-clicking the table and selecting New.

Setting Recommended Value Description
app.update.auto false Disable automatic downloading and installing of Firefox updates to avoid unexpected dialogs.
app.update.enabled false Disable automatic checking for updates to avoid unexpected dialogs.
app.update.silent true Suppress UI prompts for updates to avoid unexpected dialogs.
browser.formfill.enable false Disable automatic completion of forms to prevent unexpected behavior during test recording and run.
extensions.update.enabled false Disable checking for updates for Firefox extensions to avoid unexpected dialogs during test recording and run.
signon.autofillForms false Do not automatically fill login forms with user names and passwords to prevent unexpected behavior during test recording and run.
signon.rememberSignons false Disable Firefox Password Manager to prevent unexpected behavior when logging in to web applications during test recording and run.
Settings TestComplete Configures Automatically

TestComplete configures the following Firefox settings automatically when it launches Firefox or when it opens a web page in Firefox. This happens when one of the following is called in your test:

After TestComplete modifies the settings, it will not restore them to their initial values. You will have to restore them manually, if you need to.

Setting Value Description
browser.sessionstore.resume_from_crash false Disable Firefox crash recovery to prevent unexpected browser behavior during test recording and run.
browser.shell.checkDefaultBrowser false Disable checking if Firefox is the default browser in order to prevent unexpected messages on startup.
browser.startup.page 0 Start Firefox and open new tabs with a blank page (about:blank) to improve performance and avoid recording of superfluous web pages.
browser.tabs.warnOnClose false Disable warning when closing multiple tabs to avoid unexpected messages during test recording and run.
browser.tabs.warnOnOpen false Disable warning when opening multiple tabs to avoid unexpected messages during test recording and run.
security.insecure_field_warning.contextual.enabled
security.insecure_password.ui.enabled
false Since version 52, Firefox shows a warning about a possible user credentials exposure on HTTP web sites. The warning usually appears next to the user name and password edit boxes. To prevent the warning from disrupting your automated testing, disable it by setting the options to false.
toolkit.startup.max_resumed_crashes -1 If Firefox exits unexpectedly one or more times in a row, the next time it starts, it will show the Firefox Safe Mode dialog. To prevent this dialog from disrupting your automated testing, disable it by settings the option to -1.
security.sandbox.content.level 1 Affects security levels of Firefox, see wiki.mozilla.org/Security/Sandbox#Content. For TestComplete to be able to access Firefox processes, set this setting to 1.

If your web tests require that the same instance of Firefox be running for a long time, then consider optimizing Firefox’s memory consumption as well. For detailed instructions on how to do that, see https://support.mozilla.org/en-US/kb/firefox-uses-too-much-memory-ram.

See Also

Preparing Web Browsers
Classic Web Testing
Requirements for Web Testing

Highlight search results