I am getting the following exception when trying to get Microsoft Edge automation to work with Selenium:
OpenQA.Selenium.WebDriverException: Unexpected error. Unknown error
I am using the Selenium.WebDriver.MicrosoftDriver NuGet package, version 17.17134.0.
My code is simply the constructor:
var driver = new EdgeDriver();
I have tried various overloads that are suggested:
var driver = new EdgeDriver(new EdgeOptions());
var driver = new EdgeDriver(pathToMicrosoftWebDriverExecutable);
No luck. I made sure that the WebDriver version from Microsoft matched the Edge version on the machine running the tests.
Is there any way I can get a more informative error message here? Note that all Selenium unit tests work as expected with both the Firefox and Chrome WebDrivers, it's only Edge that won't work.