1

This is my first question here so I apologize in advance if I haven't followed protocol in some fashion...

I'm getting the following exception when attempting to instantiate an instance of OpenQA.Selenium.Edge.EdgeDriver. I have separate .Net Core 2.2 and .Net Framework 4.7.2 applications and both get the same exception.

edgeDriver = new EdgeDriver();

This is the error message:

Message: OneTimeSetUp: OpenQA.Selenium.WebDriverException : Unexpected error. Unknown error

Stack Trace:

OpenQA.Selenium.WebDriverException : Unexpected error. Unknown error at
OpenQA.Selenium.Remote.RemoteWebDriver.UnpackAndThrowOnError(Response errorResponse) at 
OpenQA.Selenium.Remote.RemoteWebDriver.Execute(String driverCommandToExecute, Dictionary`2 parameters) at 
OpenQA.Selenium.Remote.RemoteWebDriver.StartSession(ICapabilities desiredCapabilities) at 
OpenQA.Selenium.Remote.RemoteWebDriver..ctor(ICommandExecutor commandExecutor, ICapabilities desiredCapabilities) at OpenQA.Selenium.Edge.EdgeDriver..ctor(EdgeOptions options) at 
OpenQA.Selenium.Edge.EdgeDriver..ctor() at 
Selenium.EdgeTests.Setup()

Addtional information:

Windows 10 Pro v1903 (Developer Mode is on)

Edge v80.0.361.69(64-bit)

NUnit v3.12.0

NUnit3TestAdapter v3.16.1

Selenium Support v3.141.0

Selenium WebDriver v3.141.0

MicrosoftWebDriver.exe File & Product Version 10.0.17134.1

I have also tried adding Selenium.WebDriver.MicrosoftWebDriver v10.0.17134 and Selenium.WebDriver.MicrosoftDriver v17.17134.0, independently of each other, to no avail, same exception.

Community
  • 1
  • 1
  • [An unhandled exception of type 'OpenQA.Selenium.WebDriverException' occurred in WebDriver.dll Additional information: Unexpected error. Unknown error](https://stackoverflow.com/questions/40247162/an-unhandled-exception-of-type-openqa-selenium-webdriverexception-occurred-in) might help – stuartd Mar 20 '20 at 18:08
  • Or [Microsoft Edge WebDriver - Unexpected error. Unknown error](https://stackoverflow.com/questions/53540426/microsoft-edge-webdriver-unexpected-error-unknown-error?noredirect=1) – stuartd Mar 20 '20 at 18:09
  • Microsoft *recommends* Selenium >= 4.00-alpha04, so it might be worth a shot if these other comments don't help you... More info at https://docs.microsoft.com/en-us/microsoft-edge/webdriver-chromium – rfmodulator Mar 20 '20 at 18:13
  • Thanks for the reply @stuartd! I've already turned Developer Mode on which installed the driver in c:\windows. – JPFsuNoleFan Mar 20 '20 at 18:26
  • Thanks for the reply @rfmodulator! I'll take a look – JPFsuNoleFan Mar 20 '20 at 18:32
  • 1
    @rfmodulator wins the day! I was able to utilize the example under the 'Selenium 4.00-alpha03 and earlier' section with a little tweaking to resolve the deprecated DesiredCapabilities. Thanks again! – JPFsuNoleFan Mar 20 '20 at 20:51
  • @rfmodulator, If possible please try to post your suggestion as an answer to this question. It can help other community members in the future in similar kinds of issues. Thanks for your understanding. – Deepak-MSFT Mar 25 '20 at 05:59
  • @Deepak-MSFT I think it would be more appropriate for JPFsuNoleFan to post the final solution. I merely suggested using a newer version, which apparently wasn't necessary. I'll be happy to upvote though! – rfmodulator Mar 25 '20 at 15:41

1 Answers1

1

I'm posting this as an answer but the credit should go to @rfmodulator, as it was his suggestion.

I looked at https://docs.microsoft.com/en-us/microsoft-edge/webdriver-chromium and I was able to utilize the example under the 'Selenium 4.00-alpha03 and earlier' section with a little tweaking to resolve the deprecated DesiredCapabilities.