Skip to main content

Web Testing Setup

Step 1: Download and Install drivers

In order to use Cycle web Steps, a driver must be installed for Chrome, Internet Explorer, or Microsoft Edge.

With a Cycle Project open, click the Project Settings button:

Then navigate to: Project Settings > Execution Settings > WebDrivers & Browser

Chrome and IE

The downloads for Chromedriver and IEDriver executables can be found from Chromium and Selenium:

The Chrome WebDriver is typically named chromedriver.exe, the Internet Explorer WebDriver is typically named IEDriverServer.exe. These drivers can be saved to anywhere on the hard drive, as long as you know the path to the location.

Microsoft Edge

First, ensure you install Microsoft Edge (Chromium). To confirm that you have Microsoft Edge (Chromium) installed, go to edge://settings/help in the browser, and verify the version number is Version 75 or later.

To begin automating tests with Edge, use the following steps to ensure that the WebDriver version you install matches your browser version.

  1. Go to edge://settings/help to get your version of Edge.

  2. Navigate to the Microsoft Edge Driver downloads page and download the driver that matches your Edge version number.

Set Driver Location within Cycle Settings

Once you have downloaded a given WebDriver, you will need to update the driver location in Cycle Settings. The location must be exact for each browser’s WebDriver, and must include the name of the driver, as shown in the image below.

Set WebDriver location

There are additional settings related to web test execution in Cycle--one for automatically closing the web browser after a given Scenario is finished executing, and another to automatically close the web browser when exiting Cycle. It should also be noted that both browsers will rely on whatever proxy settings the user is using as a default.

Step 2: Update Browser Settings

First, note that Cycle expects all web browsers to be installed in their default locations.

Chrome and Microsoft Edge

There are no browser settings that must be updated in Chrome or Edge.

It should be noted that any settings made in a user’s Chrome browser will not be carried over into the Cycle-generated Chrome browser, because Chrome settings are tied to user profiles.

Internet Explorer

In order for Cycle to work with the Internet Explorer web browser, you must verify the following:

  • Ensure you are running the latest version of the Internet Explorer Driver Server from here.

  • In Internet Explorer, go to Settings > Zoom and ensure that zoom is set to 100%.

  • In IE's Advanced Options make sure the following settings are not checked/enabled:

    • Reset text size to medium for new windows and tabs
    • Reset zoom level for new windows and tabs
  • On IE 7 or higher on Windows Vista or Windows 7, you must set the Protected Mode settings for each zone to be the same value. The value can be on or off, as long as it is the same for every zone. To set the Protected Mode settings, choose "Internet Options..." from the Tools menu, and click on the Security tab. For each zone, there will be a check box at the bottom of the tab labeled "Enable Protected Mode".

  • Additionally, "Enhanced Protected Mode" must be disabled for IE 10 and higher. This option is found in the Advanced tab of the Internet Options dialog. The browser zoom level must be set to 100% so that the native mouse events can be set to the correct coordinates.

  • For Windows 10, you also need to validate your Display Settings. Under the Scale and Layout section Change the size of text, apps, and other items should be set to 100%.

    • If you are using remote desktop to run Cycle on a remote machine, this display setting must be set to 100% on both your local machine and the remote machine that you are connecting to.
  • If you are running a popup blocker or ad blocker, ensure the site you are testing is whitelisted or the blocker is turned off.

Internet Explorer security settings

  • Add the sites you wish to access to the Trusted sites zone by going to Settings Menu > Internet Options > Security > Trusted sites and clicking the "Sites" button. Add the domain of the website you wish to access to the Trusted sites list. It is very important that you add the domains you wish to test to the Trusted sites list. You must also verify that the Security level for the Trusted sites zone is not set to “High”.

Update Trusted sites list

For IE 11 only:

You will need to set a registry entry on the target computer so that the driver can maintain a connection to the instance of Internet Explorer it creates.

  • For 32-bit Windows installations, the key you must examine in the registry editor is HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BFCACHE.
  • For 64-bit Windows installations, the key is HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BFCACHE.

(Please note that the FEATURE_BFCACHE subkey may or may not be present, and should be created if it is not present.)

Important: Inside this key, create a DWORD value named iexplore.exe with the value of 0.

Edge IE Mode

In preparation of the Internet Explorer End-Of-Life, Microsoft made it possible to run IE Compatibility Mode websites inside of Microsoft Edge.

Cycle also supports this capability by using the IE Driver to attach to Microsoft Edge. To utilize this functionality, follow the steps below.

Note: This guide assumes you have already configured the necessary Compatibility Mode, Security, and/or ActiveX settings for your legacy websites in the Internet Options control panel widget. Additionally, please be sure to perform the IE configuration instructions above.

  1. Ensure that the 32-bit, Chromium-based version of Microsoft Edge is installed (the default location of the executable is C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe)

  2. Download and extract the 32-bit IE Driver Server from the Selenium website

  3. Important: Add the directory that contains IEDriverServer.exe to your system or user environment PATH variable.

    To ensure successful configuration, open a command prompt window and run IEDriverServer from any directory other than where it was installed. The operating system should be able to find the executable regardless of current working directory.

  4. After making changes to environment variables, Cycle must be restarted.

  5. Configure the IE Driver inside of your Cycle project's Execution settings

  6. Execute the following steps to ensure successful configuration:

    Given I open "Edge IE Mode" web browser
    When I navigate to "https://www.cyclelabs.io" in web browser

    Ensure you see a Microsoft Edge window with the following layout: Edge IE Mode toolbars

Step 3: Choose WebDriver Execution Settings

Cycle 2.22 contains a new version of the WebDriver service, the Step Plugin WebDriver. This contains new steps, fixes, and gives more control over how your tests execute.

Element Finding Strategy

You'll need to set the Element Finding Strategy setting to suit your needs.

  1. Frame will search for elements in the root content and then recursively search any iframes. This was the default for older versions of Cycle, referred to as Full Search.
  2. Direct will only search for elements in the current scope. To interact with an element in an iframe, you'll first need to switch to that iframe. This used to be called Limited Search.

Who uses Frame?

New and experienced users use Frame. It is the default and you do not need to do anything to set it up. All visible elements on the page can be located without considering scope.

Who uses Direct?

Experienced users who find they have long-running web tests and need to reduce execution time. This is for testers expecting "Direct" behavior from WebDriver, and may want to manage their own iframes. Direct allows the user to potentially narrow the scope of element searches so the driver will spend less time searching. New steps were added for dealing with iframes. *View them in the step guide by filtering for category IFrame*.

Users who are testing pages where they're only interested in the root content. If there are iframes on your pages, but you do not wish to interact with any of their content, then consider using Direct.

Timeouts

The Step Plugin can run fast. If your test is written around a behavior that reacts slowly or validations start before the page is fully loaded, you might see test failures. Try out these tips if you're seeing new issues.

  1. There is a global timeout called Default waiting timeout (ms) that is set to 30000 (which is 30 seconds). If your test has loads that take longer than this, you might need to increase that value.
  2. You can add smart validations to the interaction, like waiting for a specific element to be visible and enabled after navigating to a new page.
  3. If all else fails, you can try adding a short wait between steps that have frequent errors.

Troubleshooting With Older Versions

If you come across problems with test execution, it is possible to switch to using the older WebDriver service. To do this, follow these steps:

  1. Edit the contents of your .env file here: C:\Users\USERNAME\AppData\Roaming\Cycle\config\.env Add this to the contents of the .env file: CYCLE_WEB_PLUGIN_ENABLED=false. It will turn off the step plugin.
  2. Remove the webdriver-plugin folder from the steps folder: C:\Program Files (x86)\CycleLabs\clilauncher\steps\webdriver-plugin. If you don't remove this, Cycle will load both the new and old step definitions, causing issues. You can move it anywhere else and place it back later.
  3. Turn back on the WebDriver that you desire:
  • Full search: No action required, this is the default when the plugin is disabled.
  • Limited search: In the .env file, set CYCLE_WEB_DRIVER_SERVICE_ENABLED=true