Is there a Selenium WebDriver available for the Microsoft Edge browser?

后端 未结 7 886
猫巷女王i
猫巷女王i 2020-12-01 06:00

As of the date of this post the name \"Microsoft Edge\" has just been officially announced as the default browser for the new Windows 10.

It may be premature to ask

7条回答
  •  情歌与酒
    2020-12-01 06:45

    Microsoft has provided MicrosoftWebDriver which can be used for Edge browser.

    1. Correct version of MicrosoftWebDriver needs to be downloaded, based on the OS Build number

    2. Go to Start > Settings > System > About and note down the OS Build number.

    3. Download the proper version of the driver from this link - https://developer.microsoft.com/en-us/microsoft-edge/tools/webdriver/

    4. If the file that's downloaded is .msi, then install it to get the .exe driver. For one of the release, direct .exe can be downloaded.

    5. Once the MicrosoftWebDriver.exe is downloaded, we can use it in our test script using either System.setProperty("webdriver.edge.driver", "driver location") or using environment variable

    The sample script would be like this -

    System.setProperty("webdriver.edge.driver","C:\\Program Files (x86)\\Microsoft Web Driver\\MicrosoftWebDriver.exe"); //put actual location
    WebDriver driver = new EdgeDriver();
    driver.get("your link");
    

    Refer this article for detailed information - http://automationtestinghub.com/selenium-3-launch-microsoft-edge-with-microsoftwebdriver/

提交回复
热议问题