Skip to content

Latest commit

 

History

History
83 lines (74 loc) · 3.1 KB

File metadata and controls

83 lines (74 loc) · 3.1 KB
title description summary_image
Microsoft Edge WebDriver
Learn about how to use Microsoft Edge WebDriver with Nightwatch

EdgeDriver

Run your Nightwatch.js tests in Edge can be achieved using the Microsoft Edge WebDriver.

Downloading EdgeDriver

Step 1. Download Microsoft Edge WebDriver - Depending on the version of your Edge Browser, download the relevant Microsoft Edge WebDriver.

Step 2. Configure the path - You can either add the path to the Microsoft Edge WebDriver binary to the system PATH or set the location in the cli_args key under the selenium key in your nightwatch.json file as follows:


"localEdge": {
       selenium_host: "127.0.0.1",
       selenium_port: 4444,
       selenium: {
           start_process: true,
           host: "127.0.0.1",
           port: 4444,
           cli_args: {
               "webdriver.edge.driver": "C:\\Program Files (x86)\\Microsoft Web Driver\\MicrosoftWebDriver.exe",
           }
       },
        desiredCapabilities: {
           platform: "Windows 10",
           browserName: "MicrosoftEdge",
           javascriptEnabled: true
       }
}

Alternatively, add the server_path in the "edge" configuration:


    edge: {
      desiredCapabilities: {
        browserName: 'MicrosoftEdge',
        'ms:edgeOptions': {
          w3c: true,
          // More info on EdgeDriver: https://docs.microsoft.com/en-us/microsoft-edge/webdriver-chromium/capabilities-edge-options
          args: [
            //'--headless'
          ]
        }
      },

      webdriver: {
        start_process: true,
        // Follow https://docs.microsoft.com/en-us/microsoft-edge/webdriver-chromium/?tabs=c-sharp#download-microsoft-edge-webdriver
        // to download the Edge WebDriver and set the location of extracted `msedgedriver` below:
        server_path: 'C:\\Users\\user\\edgedriver\\msedgedriver.exe',
        cli_args: [
        ]
      }
    },

Learn more

For more information about the Microsoft Edge WebDriver refer to the Official documentation.