Before you start creating automated tests for web applications, configure your web browser to ensure proper web object identification. You should also eliminate browser-specific behavior to make cross-browser testing easier.
|If you use several user accounts for testing purposes on your computer, make sure all the account-specific browser options are set for each account.|
The SmartBear Test Extension provides support for creating and playing back web tests in the Chrome browser. In Chrome ver. 25 and later, you may need to enable the extension. In earlier versions of Chrome, the extension is enabled by default. To enable and configure the extension:
In Chrome, go to the More Tools > Extensions page.
-- or --
Type chrome://extensions in the Chrome Address bar.
Locate SmartBear Test Extension in the list and make sure that it is enabled (that is, the Enabled check box is selected).
To test web pages opened from the local file system (their URLs start with the file:// prefix), enable the Allow access to file URLs option of the extension.
To test web pages during private browsing, enable the Allow in incognito option.
In order for the changes to come into effect, restart Chrome. Otherwise, TestLeft will not be able to access web pages that are open in Chrome.
Chrome has a variety of command-line switches; some of them are needed to perform automated testing with TestLeft:
--disable-hang-monitor - Disables Chrome hang monitor to prevent it from considering SmartBear Test Extension as unresponsive during long test runs.
--allow-file-access-from-files - Enables testing of local pages that use framesets displaying other local pages.
--disable-web-security - Enables testing of web pages that use cross-origin framesets.
--disable-renderer-accessibility - Disables creating MSAA/UIA web page objects. It improves playback performance, especially for pages with a large number of objects.
--disable-hang-monitor switch is required, others are optional and should be used only if you need them to test your specific web application.
When you launch Chrome from your tests by using the
Applications.RunBrowser method, it automatically uses the
If you launch Chrome using a desktop shortcut, 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-monitor and other needed switches (separated by spaces) to the Target value.
Navigate to chrome://settings/content.
If your tested web application uses HTML pop-ups, you need to disable Chrome’s pop-up blocker:
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.
New versions of Chrome are released frequently. If the browser’s auto-update feature is enabled, it can automatically upgrade Chrome to a version that TestLeft does not support yet.
To avoid this, we recommended that you disable the browser’s auto-update feature on the test machine and install the latest Chrome version that is supported by your version of TestLeft manually.
To disable the auto-update feature, do any of the following:
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\UpdateDefault registry value (REG_DWORD) and set it to "0".
To learn which Chrome versions are supported by TestLeft, go to the Google Chrome Patches page.
You can also check for updates automatically. See Web Browser Updates for details.
Starting from Chrome version 69, the
ThirdPartyBlockingEnabled security policy prevents injecting third-party modules into Chrome processes. This may prevent TestLeft from loading its necessary testing modules to Chrome processes, which may cause issues with your Chrome tests. For instance, TestLeft may report errors when simulating user actions on the Open File and Save File dialogs invoked 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
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.
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 chromium.org/administrators/policy-list-3.
Some extensions may cause unexpected behavior of the browser, or even modify network traffic, which does not allow you to perform automated web testing. We recommend that you disable all third-party extensions except for SmartBear Test Extension and the extensions required for testing.
To disable extensions:
From Chrome’s main menu, select Settings and then select Extensions on the left.
Clear the Enabled check box next to extensions you do not need.
For detailed instructions, see http://support.google.com/chrome/bin/answer.py?hl=en&answer=187443.
We recommend that you configure Google Chrome as described below. These settings are not required for automated testing, but using them will prevent unexpected browser behavior and improve Chrome performance during the test run.
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 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 runs.
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.
Important: To create tests for the Edge version that comes with the Windows 10 Fall Creators Update, you must have the KB4051963 Windows update installed on your computer.
To check whether the update is installed, go to Windows Update Settings and click View installed update history. View the list of updates installed recently.
The update can be installed automatically from Windows Update, or you can download the update from the Microsoft Update Catalog and install it manually.
To allow TestLeft to always access internal objects, properties and methods of the Edge web browser, stop Edge from running in the background:
On your Windows 10 computer, click Start and then select Settings.
In the Settings application, select Privacy.
Then select Background apps from the list on the left.
The Settings application will show a list of your applications that can run in the background.
Turn off Edge in the list to prevent it from running in the background.
We recommend that you configure Microsoft Edge as described below. These settings are not required for automated testing, but using them will prevent unexpected browser behavior and improve Edge performance during the test run.
Select Settings from Edge’s main menu.
On the Settings page:
Set the Open with option to A specific page or pages.
In the drop-down list, select Custom and enter about:blank.
Using a blank home page improves the browser's startup performance.
Click the View advanced settings button.
On the Advanced settings page:
Set the Offer to save passwords and Save form entries options to Off.
This will prevent unexpected behavior when filling in forms during test runs.
If you want to test Flash and Flex web applications, then make sure that the Use Adobe Flash Player option is enabled (On).
If your tested web application uses HTML pop-ups, then make sure that the Block pop-ups option is disabled (Off).
Some add-ons (for example, the Softonic Toolbar) may cause unexpected behavior of the browser, or even modify network traffic, which does not allow you to perform automated web testing. We recommend that you disable all third-party add-ons unless they are required by testing.
To disable add-ons:
Select Tools | Manage Add-ons from the main menu of Internet Explorer.
Select an add-on and click the Disable button.
For detailed instructions, see http://windows.microsoft.com/en-US/internet-explorer/manage-add-ons.
We recommend that you configure Internet Explorer as described below. These settings are not required for automated testing, but using them will prevent unexpected browser behavior and improve Internet Explorer performance during the test run.
From the main menu of Internet Explorer, select Tools | Internet Options. (If the menu bar is hidden, press F10 to temporarily show it.)
On the General tabbed page, set Home page to about:blank. Using a blank home page will prevent recording of superfluous web pages and reduce Internet Explorer startup time.
In the Tabs section, click Settings.
In the Tabbed Browsing Settings dialog:
Uncheck the Warn me when closing multiple tabs option. This will prevent unexpected browser messages when closing tabs.
Set the When a new tab is opened option to A blank page. This will prevent recording of superfluous web pages and reduce tab opening time.
Switch to the Security tabbed page and uncheck the Enable Protected Mode option.
If your tested application uses HTML popups, you need to disable Internet Explorer’s Pop-Up Blocker. To do this, switch to the Privacy tabbed page and uncheck Turn on Pop-Up Blocker.
Switch to the Content tabbed page.
In the AutoComplete section, click Settings.
In the AutoComplete Settings dialog:
Uncheck the Forms and User names and passwords on forms options. This will ensure proper recording of form filling and prevent unexpected behavior when recording or running tests.
To clear previously saved form data and passwords, click Delete AutoComplete history, select Form data and Passwords and then click Delete.
Switch to the Programs tabbed page and uncheck the Tell me if Internet Explorer is not the default web browser option. This will prevent unexpected messages when the browser is starting.
Switch to the Advanced tabbed page.
Uncheck Display a notification about every script error.
Click OK to save the changes made to the Internet Explorer options.
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 TestLeft does not support yet.
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 TestLeft version manually.
To disable the auto-update feature:
Select Tools | Options from the main menu of Firefox.
Go to the Advanced panel and switch to the Update tab.
Set the Firefox updates property to "Check for updates, but let me choose whether to install them" or to "Never check for updates".
To learn which Firefox versions TestLeft supports, go to the Mozilla Firefox Patches page.
You can also check for updates automatically. See Web Browser Updates for details.
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. We recommend that you disable all third-party add-ons unless they are required for testing.
To disable add-ons:
Select Tools | 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.
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, TestLeft may 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:
Start Firefox and type
about:config in the Address bar. This will open the page with Firefox settings.
browser.tabs.remote.autostart property in the list and set its value to
If you have the
browser.tabs.remote.autostart.2 property in the preference list, set its value to
false as well.
If you do not have the property in the list, ignore this step.
We recommend that you configure Firefox as described below. These settings are not required for automated testing, but using them will help you avoid unexpected browser-specific warnings and improve Firefox performance during the test run.
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.
|Option Name||Recommended Value||Description|
|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 run.|
|extensions.update.enabled||false||Disable checking for updates for Firefox extensions to avoid unexpected dialogs during test run.|
|signon.autofillForms||false||Do not automatically fill login forms with user names and passwords to prevent unexpected behavior during test run.|
|signon.rememberSignons||false||Disable Firefox Password Manager to prevent unexpected behavior when logging in to web applications during test run.|
TestLeft configures the following Firefox settings automatically when it launches Firefox by using the
|After TestLeft modifies the settings, it will not restore them to their initial values. You will have to restore them manually if you need.|
|browser.sessionstore.resume_from_crash||false||Disable Firefox crash recovery to prevent unexpected browser behavior during test 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.|
|browser.tabs.warnOnClose||false||Disable warning when closing multiple tabs to avoid unexpected messages during test run.|
|browser.tabs.warnOnOpen||false||Disable warning when opening multiple tabs to avoid unexpected messages during test 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 settings the options to false.|
|security.sandbox.content.level||1||Affects security levels of Firefox, see wiki.mozilla.org/Security/Sandbox#Content. In order for TestLeft to be able to access Firefox processes, set this setting to 1.|
|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.|
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.