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’s functionality and performance.
Since TestComplete interacts with Google Chrome via the SmartBear Test Extension, the latter is disabled as well. Therefore, in order to perform web testing in Chrome ver. 25 and later, you need to enable the extension manually (as described in this topic).
You need to enable the extension only once after installing/updating Chrome. Normally, this is not a problem. However, if your testing environment is deployed automatically and it includes automatic installation of TestComplete, TestExecute or 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. Yet, this workaround requires additional deployment steps and has a number of restrictions and limitations. This topic describes the workaround and its restrictions.
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.
Taking into account the above-mentioned specifics, automatic deployment of the testing environment should include the following steps:
CScript.exe gpReg.js /r
CScript.exe gpReg.js /u