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.
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:
Click on the Firefox toolbar.
Select Options from the main menu of Firefox.
Scroll to the Firefox Updates block.
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:
Click on the Firefox toolbar.
Select Add-ons from the main menu of Firefox.
Select the Extensions or Plugins page.
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.
Check Multiprocess Mode Settings
Important: Recent Firefox versions can work in multiprocess mode in which Firefox creates several processes in the operating system. In version 53 and earlier, this mode was optional. Since version 54, this is the default functioning mode of the browser.
If Firefox is running in this mode, TestComplete might experience issues with:
Detecting web dialogs like Alert, Confirm or Prompt.
Detecting the browser’s active tab.
Testing Flash and Flex applications.
If you encounter such issues, you can disable the multiprocess mode by creating the MOZ_FORCE_DISABLE_E10S environment variable with any value:
Open Control Panel and select the System applet.
Click Advanced system settings.
On the Advanced tab, click Environment Variables.
Click New and then type the MOZ_FORCE_DISABLE_E10S variable name and any variable value.
Note: It doesn't matter what variable type you will create (User or System).
Click OK twice to close the dialogs and apply the changes.
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.
|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:
The Run Browser operation.
The Navigate operation.
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.
|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.|
|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 unexpectely 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.
Disable content process sandboxing
If you are facing an issue with TestComplete not able to access
Page objects in Firefox, 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.
Open the System Properties dialog. To do this, for example, click Start, type environment and then click Edit the System Environment Variables:
In the resulting dialog, on the Advanced tab, click Environment Variables:
In the Environment Variables dialog, in the System variables section, click New.
In the resulting New System Variable dialog, type
MOZ_DISABLE_CONTENT_SANDBOXin the Variable name text box. Type 1 in the Variable value text box.
Click OK to save the variable.
You may need to restart Firefox for the changes to take effect.