Forced Installation of SmartBear Test Extension for Chrome

Applies to TestComplete 15.62, last modified on March 19, 2024

Since version 25, Chrome disables all third-party extensions upon installation or update. This is done to reduce the number of extensions that affect Chrome functionality and performance.

TestComplete interacts with Google Chrome via the SmartBear Test Extension. If the extension has been disabled after the update, to perform web testing in Chrome ver. 25 and later, enable the extension manually.

You need to enable the extension only once after installing or updating Chrome. Normally, this is not a problem. However, if your testing environment is deployed automatically and it includes an automatic installation or update of Google Chrome, then manual enabling of the extension is not an acceptable option. In this case, you can add the extension to the list of force-installed Chrome extensions.

This requires additional deployment steps and has a number of restrictions and limitations.

Add SmartBear Test Extension to the list of force-installed extensions

Google Chrome allows specifying a list of force-installed extensions. The extensions that are on the list are installed silently, without user interference. On Windows, the list of force-installed Chrome extensions is part of the Local Group Policy settings and is stored in the Windows Registry.

Force-installed extensions have the following limitations:

If the SmartBear Test Extension is force-installed, the last limitation means that TestComplete will be unable to test web pages during private browsing and web pages stored as local files.

To automate registering and unregistering the SmartBear Test Extension as a force-installed Chrome extension, use the following Windows Script file: gpReg.js. (Download it as a zip archive and unpack it to any folder.) The script has two main command-line arguments: /r registers the extension, and /u unregisters the extension. The third (optional) command-line argument /s allows disabling the output of informative and error messages.

Windows Scripts can be launched either in the non-interactive mode (with CScript.exe) or in the user interactive mode (with WScript.exe). For automation purposes, the non-interactive mode is preferred.

Testing environment deployment

Taking into account the above-mentioned specifics, automatic deployment of the testing environment should include the following steps:

  1. Install TestComplete or TestExecute.
  2. Force-install the SmartBear Test Extension: CScript.exe gpReg.js /r
  3. Perform web testing.
  4. Uninstall the SmartBear Test Extension: CScript.exe gpReg.js /u
  5. Uninstall TestComplete or TestExecute.
  6. Launch and then close Google Chrome. (This is done in order to update the list of the installed extensions. Chrome issue: 175960.)

See Also

Preparing Chrome for Web Testing
About SmartBear Test Extension
Considerations for Web Testing

Highlight search results