Skip to content

Internet Explorer Setup

Lucas Pang edited this page Feb 9, 2017 · 3 revisions

Running tests in Internet Explorer is possible with the aid of the IEDriver.

Getting started

1. Download IEDriver - download the latest version of the Internet Explorer Driver from the [Selenium Downloads] (http://selenium-release.storage.googleapis.com/index.html).

2. Configure the path - either add the path to the IEDriver binary to the system PATH or set the location in your nightwatch.json, under the selenium options like so:

"selenium" : {
  ...
  "cli_args" : {
    "webdriver.ie.driver" : "C:/path/to/InternetExplorerDriver.exe"
  }
}

Other settings

  • Windows Vista / Windows 7 - Protected Mode settings for each zone must be set 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".

  • "Enhanced Protected Mode" - must be disabled for IE 10 and higher. This option is found in the Advanced tab of the Internet Options dialog.

  • Zoom level - must be set to 100% so that the native mouse events can be set to the correct coordinates.

  • 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. Inside this key, create a DWORD value named iexplore.exe with the value of 0.

IE-specific DesiredCapabilities

A list of IE-specific capabilites that can be specified inside the desiredCapabilities dictionary can be found here.

Command Line Switches

The following IEDriver specific command-line arguments are supported and can be set in the cli_args object as part of the selenium dictionary, as seen in the above example.

Property What it means
webdriver.ie.driver The location of the IE driver binary.
webdriver.ie.driver.host Specifies the IP address of the host adapter on which the IE driver will listen.
webdriver.ie.driver.loglevel Specifies the level at which logging messages are output. Valid values are FATAL, ERROR, WARN, INFO, DEBUG, and TRACE. Defaults to FATAL.
webdriver.ie.driver.logfile Specifies the full path and file name of the log file.
webdriver.ie.driver.silent Suppresses diagnostic output when the IE driver is started.
webdriver.ie.driver.extractpath Specifies the full path to the directory used to extract supporting files used by the server. Defaults to the TEMP directory if not specified.

More Info

For more info about the IEDriver refer to the Official documentation.