Microsoft Edge WebDriver - Unexpected error. Unknown error

后端 未结 2 1292
佛祖请我去吃肉
佛祖请我去吃肉 2021-01-05 10:05

I am getting the following exception when trying to get Microsoft Edge automation to work with Selenium:

OpenQA.Selenium.WebDriverException: Unexpecte

相关标签:
2条回答
  • 2021-01-05 10:48

    I know you mentioned you had the same versions, but I was getting the same error myself and this is how I resolved it so hopefully this helps.

    It appears that Microsoft is no longer releasing the Web Driver as a standalone version, which may be the issue. (See here for more details) Currently, Edge seems to be at version 17763, whereas the NuGet package is 17134. So what I had to do was go in and "install it as a standalone by going to Settings > Apps > Apps & features > Manage optional features." There are some alternative directions that are included in the link above.

    Once that installed I pointed the driver to the location and it finally worked.

    var driver = new EdgeDriver("C:\\Windows\\System32\\", edgeOptions);
    
    0 讨论(0)
  • 2021-01-05 10:51

    I'm not sure how or why, but this worked for me, also. I was getting the pesky "Message: OpenQA.Selenium.WebDriverException : Unexpected error. Unknown error".

    I followed Brian Murphy's instructions to install Microsoft Edge Driver as a Standalone by managing my optional features. I don't know where windows installed it, and I didn't need to change any of my code in C#, and my test which was previously failing at Driver = new EdgeDriver(edgeService, options);

    once again started to pass.

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