This topic describes Google Chrome settings required by TestComplete for automated web testing. Make sure to configure Chrome in this way on all 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.
Install and configure the SmartBear Test Extension
The SmartBear Test Extension provides support for recording and playing back web tests in Chrome. This extension is installed and enabled automatically when you install TestComplete.
To verify that the extension is installed and enabled, look at the browser navigation bar — you should see the TestComplete icon there.
If the icon does not appear, navigate to chrome://extensions and make sure that SmartBear Test Extension is enabled. If the extension is not listed, install it manually.
Note: If the browser was running during TestComplete installation, you may need to reload web pages that have been opened in it for the test engine to be able to access them.
To test local pages (file://...) or pages in incognito mode:
From the Chrome menu, select More Tools and then select Extensions.
– or –
Type chrome://extensions in the Chrome Address bar.
Locate SmartBear Test Extension in the list and make sure that it is enabled.
To test web pages opened from the local file system (their URLs start with the file:// prefix), select the Allow access to file URLs option of the extension.
To test web pages during private browsing, select the Allow in incognito option.
Restart the browser to apply the changes.
Chrome has a variety of command-line arguments. In general, none of them is required by TestComplete. However, depending on your test specifics, you may need to specify some of them to run automated tests:
||Disables the Chrome hang monitor to prevent it from considering the SmartBear Test Extension unresponsive during long test runs.
This argument is required to run tests that work for 10 minutes or longer. You may omit it for shorter tests.
||Enables testing of local pages (file://...) that use framesets displaying other local pages. Specify this argument to test HTML files that reside on your local computer.|
||Enables testing of web pages that use cross-origin framesets, for example,
||Specifies a custom folder for storing user profile data.|
||Allows setting up Chrome security.
Note: For this command-line argument to have any effect, the SitePerProcess policy must not be enabled in the browser.
||Disables creating MSAA/UIA web page objects.
Use this argument to improve playback performance, especially for testing pages with a large number of objects.
When the browser is launched in any of the ways described in the Launching Browsers topic, TestComplete automatically uses the
--disable-hang-monitor switch for it. To specify other switches, use the Browsers.Item(…).RunOptions property.
If you launch the browser manually, you can specify the needed switches in the shortcut parameters:
Right-click the shortcut and select Properties from the context menu.
Switch to the Shortcut tab.
--disable-hang-monitorand other needed switches (separated by spaces) to the Target value.
Navigate to chrome://settings/content.
If your tested web application uses HTML pop-ups, disable the pop-up blocker in Chrome:
Navigate to chrome://settings/content.
In the Pop-ups section, select Allow all sites to show pop-ups.
Alternatively, if you prefer to have the pop-up blocker enabled, you can add your tested web application to the exceptions list. To do that, click Manage exceptions and use the subsequent Pop-up Exceptions page.
Disabling automatic updates
New versions of Chrome are released frequently. If the browser auto-update feature is enabled, it can automatically upgrade Chrome 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 browser version that is supported by your version of TestComplete manually.
To disable the auto-update feature:
Use the Google Update ADM template as described on the Google Update for Enterprise web page and set the Administrative Templates > Google > Google Update > Applications > Google Chrome > Update policy override property to "Manual updates only" or to "Updates disabled".
Locate or create the
HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Google\Update\UpdateDefaultregistry value (REG_DWORD) and set it to "0".
Remove or rename the
To learn which Chrome versions are supported by TestComplete, go to the Google Chrome Patches page.
Disabling third-party injection blocking
ThirdPartyBlockingEnabled security policy prevents injecting third-party modules into Chrome processes. The policy is enabled by default. This may prevent TestComplete from recording and simulating user actions on the Open File and Save File dialogs called from Chrome.
To avoid possible issues, we recommend that you disable the policy:
On your computer, open the Registry editor. To do this, click the Start or Windows button, click Run, type regedit, and press Enter.
In the Registry editor, locate the following key:
If this key does not exist, create it.
Make sure the
ThirdPartyBlockingEnabledvalue of the key is set to false (0).
If the value does not exist, create the DWORD value
ThirdPartyBlockingEnabledand set it to 0.
If your Google Chrome browser settings are managed via group policies, ask your system administrator to update the policies to disable the
To learn more about policies, see chromeenterprise.google/policies.
Disabling unnecessary extensions
Some extensions may cause unexpected behavior of the browser, or even modify network traffic, which does not allow you to perform automated web testing. So, we recommended that you disable all third-party extensions except for SmartBear Test Extension and the extensions required for testing.
To disable extensions:
From the Chrome menu, select Settings and then select Extensions on the left.
Clear the Enabled check box next to the extensions you do not need.
For detailed instructions, see http://support.google.com/chrome/bin/answer.py?hl=en&answer=187443.
If you use several accounts in Chrome, do one of the following:
Log out of all accounts except for the one you will use for testing.
– or –
Disable the SmartBear Test Extension for all accounts except for the one you will use for testing.
Additional recommended settings
We also recommend that you configure Chrome as described below. While this is not required for automated testing, this may prevent unexpected browser behavior during test recording and test runs and improve Chrome performance:
From Chrome’s main menu, select Settings.
– or –
Navigate to the chrome://settings page.
On the Basics page:
Set On startup to Open the home page.
In Home page, select Open this page: and enter about:blank.
Using a blank home page will prevent capturing of superfluous web pages during test recording and improves the browser startup performance.
On the Personal Stuff page:
Set the Passwords option to Never save passwords.
Uncheck Enable Autofill to fill out web forms in a single click.
This will prevent unexpected behavior when filling forms during test recording and test runs.
Preparing Web Browsers
About SmartBear Test Extension
Preparing CEF-Based Applications for Testing by Using Script Injection (Legacy)
Considerations for Web Testing
Classic Web Testing
Requirements for Web Testing
Possible Issues With Web Testing