Preparing Edge for Web Testing

Applies to TestComplete 15.0, last modified on October 19, 2021

TestComplete supports the Edge browser based on the Chromium engine. The legacy (non-Chromium) version of Edge is not supported.

Install SmartBear Test Extension

The SmartBear Test Extension provides support for recording and playing back web tests in Edge. 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.

SmartBear Test Extension icon in Edge

If the icon does not appear, navigate to edge://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:

  1. From the Edge menu, select Settings and more and then select Extensions.

    – or –

    Type edge://extensions in the Address bar.

  2. Locate SmartBear Test Extension in the list and make sure that it is enabled.

  3. 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.

  4. To test web pages during private browsing, select the Allow in incognito option.

  5. Restart the browser to apply the changes.

Command-line arguments

Edge 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:

Command-Line Argument Description
--disable-hang-monitor Disables the Edge 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.

--allow-file-access-from-files 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.
--disable-web-security Enables testing of web pages that use cross-origin framesets, for example, iframe elements that load data from a source other than the tested page’s original source.

Requires the --user-data-dir and --disable-site-isolation-trials arguments to be specified.

--user-data-dir=<ProfilePath> Specifies a custom folder for storing user profile data.
--disable-site-isolation-trials Allows setting up Edge security.
--disable-renderer-accessibility 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:

  1. Right-click the shortcut and select Properties from the context menu.

  2. Switch to the Shortcut tab.

  3. Append --disable-hang-monitor and other needed switches (separated by spaces) to the Target value.

Prevent Edge From Running in the Background

If Edge is allowed to run as a background application in Windows, disallow it:

  1. Click Start and then select Settings.

  2. Select Privacy.

  3. Select Background apps from the list on the left. You will see a list of applications that are allowed to run in the background.

  4. Turn off Edge in the list to prevent it from running in the background.

Required settings

TestComplete requires that JavaScript execution be enabled in Edge to identify web page elements. To enable JavaScript:

  1. In Edge, navigate to edge://settings/content.

  2. In the JavaScript section, make sure that JavaScript is set to Allow.

If your tested web application uses HTML pop-ups, disable the pop-up blocker in Edge:

  1. Navigate to edge://settings/content.

  2. In the Pop-ups and redirects section, disable blocking popups.

    Alternatively, to keep the pop-up blocker enabled, you can add your tested web application to the exceptions list. In the Allow section, click Add and add your tested website to the list of exceptions.

Disabling automatic updates

New versions of Edge are released frequently. If the browser auto-update feature is enabled, it can automatically upgrade Edge 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.

You can use group policies to control Edge updates:

  1. Get the administrative template for Edge from the Microsoft website:

    microsoft.com/en-us/edge/business/download

  2. Extract the packed files.

  3. Locate the Windows\admx\msedgeupdate.admx template file and copy it to the folder that stores policy templates. By default, it is <System_Drive>:\Windows\PolicyDefinitions.

  4. Locate msedgeupdate.admx in a Windows\admx subfolder appropriate for your system locale, for example, Windows\admx\en-US. Copy the template file to the appropriate locale subfolder of the <System_Drive>:\Windows\PolicyDefinitions folder, for example, <System_Drive>:\Windows\PolicyDefinitions\en-US.

  5. Open Local Group Policy Editor. You can do it by clicking Start > Run and typing gpedit.msc.

  6. In the editor, select the Local Computer Policy > Computer Configuration > Administrative Templates category and then select Microsoft Edge Update > Applications.

  7. In the Settings list, double-click Update policy override default.

  8. In the resulting dialog, set the setting to Enabled and then set Update Policy either to Manual updates only or to Updates disabled:

    Disabling Edge auto updates

    Click the image to enlarge it.

  9. Click OK to apply the changes and close the dialog.

Disabling third-party injection blocking

The ThirdPartyBlockingEnabled security policy prevents injecting third-party modules into Edge 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 Edge.

To avoid possible issues, we recommend that you disable the policy:

  1. On your computer, open the Registry editor. To do this, click the Start or Windows button, click Run, type regedit, and press Enter.

  2. In the Registry editor, locate the following key:

    Software\Policies\Microsoft\Edge

    If this key does not exist, create it.

  3. Make sure the ThirdPartyBlockingEnabled value of the key is set to false (0).

    If the value does not exist, create the DWORD value ThirdPartyBlockingEnabled and set it to 0.

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:

  1. Select Settings and more > Extensions from the Edge main menu or navigate to edge://extensions/.

  2. Disable all the extensions you do not need.

Edge profiles

If you use several profiles in Edge, do one of the following:

  • Log out of all profiles except for the one you will use for testing.

– or –

  • Disable the SmartBear Test Extension for all profiles except for the one you will use for testing.

Toolbars

If you add or remove toolbars in Edge (such as Favorites), you need to restart Edge afterwards.

See Also

Preparing Web Browsers
Classic Web Testing
Requirements for Web Testing
Possible Issues With Web Testing

Highlight search results