bonigarcia / webdrivermanager

Automated driver management and other helper features for Selenium WebDriver in Java
https://bonigarcia.dev/webdrivermanager/
Apache License 2.0
2.58k stars 676 forks source link

EdgeDriver setup exceptions - needs elevated command prompt? in an IDE #308

Closed DaveBrad closed 5 years ago

DaveBrad commented 5 years ago

ISSUE

io.github.bonigarcia.wdm.WebDriverManagerException: io.github.bonigarcia.wdm.WebDriverManagerException: MicrosoftWebDriver.exe should be installed in an elevated command prompt executing: dism /Online /Add-Capability /CapabilityName:Microsoft.WebDriver~~~~0.0.1.0

The above exception occurs when doing ' WebDriverManager.edgedriver().setup();' within a Netbeans 8.2 test-script. (Chrome and FF work great). My system is Win10-x64 with the latest updates to Feb-18/2019. I will be testing with a Linux environment too (no Edge of course.)

HAPPENING Looking at WDM code it appears an assumption has been made that Microsoft.WebDriver is pre-installed in System.Root(?) Am I right?

EXPECT Looking at WDM documents I assumed the drivers would be downloaded into the 'wdm.targetPath' alongside the chrome, FF,... drivers. As per WDM architecture.

Expected all drivers would be downloaded on the OS to the WDM target zone and thus divorced from platform specific paths (some of which need elevation). This would allow test-scripts to use the target-zone either as an integrated WDM.driver.setup() operation or via their own Selenium-driver-setup architecture. [In this case, dig into Windows restricted file space.]

LIKE WDM I like WDM and hope it remains working and that the Selenium driver developers will 'adopt' the principle solution, and work-with the solution WDM provides.

AlexanderPoleschuk commented 5 years ago

This is the exact message that you may found on the page: https://developer.microsoft.com/en-us/microsoft-edge/tools/webdriver/

Microsoft WebDriver is now a Windows Feature on Demand. To install run the following in an elevated command prompt: DISM.exe /Online /Add-Capability /CapabilityName:Microsoft.WebDriver~~~~0.0.1.0

Therefore, it's Microsoft limitation, not WDM. Also, Edge(and IE) should die fast, as Microsoft is working on a new browser that will use Chromium. So, you may stop testing against it :)

DaveBrad commented 5 years ago

Thanks for the timely response. I was aware of Edge's changes up-and-coming, but it appears its going to live. The 'talk' is to get Edge on MAC OS, so MS is offering something extra(?). Also, Edge is looking at going onto Window-ARM devices. But we-all have to wait and see.

Again thanks.