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

后端 未结 7 755
猫巷女王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:25

    The Microsoft Edge driver for Selenium can be automatically downloaded (for Java) using the library webdrivermanager as follows:

    EdgeDriverManager.getInstance().setup();
    

    The variable webdriver.edge.driver is also exported by webdrivermanager with the proper path of MicrosoftWebDriver.exe.

    0 讨论(0)
  • 2020-12-01 06:37

    As of EdgeHTML version 18 (which arrived with Windows version 1809), there is no longer a standalone driver download. You can obtain the new driver in one of two ways:

    • Start - type "Manage optional features" - Click "Add a Feature" - Find "WebDriver"
    • Entering the following on an elevated command prompt - "DISM.exe /Online /Add-Capability /CapabilityName:Microsoft.WebDriver~~~~0.0.1.0"

    https://blogs.windows.com/msedgedev/2018/06/14/webdriver-w3c-recommendation-feature-on-demand/#Qj75uxuFHccPmCW5.97

    Legacy versions are still available from: https://developer.microsoft.com/en-us/microsoft-edge/tools/webdriver/

    Update: It appears that version 18 is now legacy and we are back to installing a separate webdriver since the move to Chromium. The link directly above this will still take you to the correct drivers page.

    0 讨论(0)
  • 2020-12-01 06:38

    Prerequisite: Windows 10 is installed on your machine

    1. Download the specified Microsoft WebDriver server version for your build (In my case it is MicrosoftWebDriver.exe for the Operating System: Windows 10 Pro 64-bit (10.0, Build 14393))
    2. Selenium WD Java code for MS Edge is as follows:

      System.setProperty("webdriver.edge.driver", "D:\Ripon\MicrosoftWebDriver.exe");
      driver = new EdgeDriver();

    0 讨论(0)
  • 2020-12-01 06:41

    Thanks for your help, I was blocked with my tests, searching for a "EdgeDriver.exe" asked by the selenium EdgeDriver implementation and only find the MicrosoftWebDriver.

    I have made this in C# if this can help someone, based on your previous answers :

    First, you need to download the MicrosoftWebDriver nuget package, this one will only make a copy of the MicrosoftWebDriver.exe into your destination folder on compilation then

    private readonly string _localDir = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
    
    Environment.SetEnvironmentVariable("webdriver.edge.driver", _localDir + "MicrosoftWebDriver.exe");
    var driver = new EdgeDriver();
    

    Hope this can help someone.

    0 讨论(0)
  • 2020-12-01 06:44

    Yes, there is a WebDriver implementation for Microsoft Edge. Its initial availability was announced on 23 July 2015. Language bindings in the Selenium open source project have been updated to take advantage of this driver implementation, and those updates have been released in Selenium 2.47. Note that the Java language bindings were re-released as 2.47.1 to correct an initial issue. The initial implementation has limited functionality, but Microsoft is committed to bringing a fully functional driver implementation to fruition, so updates will be forthcoming.

    0 讨论(0)
  • 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/

    0 讨论(0)
提交回复
热议问题