2

Error image

Getting this error when trying to run an instance of EdgeDriver for Selenium. I'm not getting an issue like this at all when running ChromeDriver. Unfortunately, I've been asked to use Edge for this, so I don't have a choice but to go with EdgeDriver. Some have suggested that the version of the WebDriver has to be the same as the windows. Mine do not match: my windows version: 1909 (18363.657) and my WebDriver (17.17134, latest from nuget package). Where might I find the latest version of this WebDriver? The latest ones I've found is the one on nuget. Is there a different fix?

EDIT:

Init Code:

 var edgeOptions = new EdgeOptions();
 edgeOptions.StartPage = url;
 EdgeDriver edgeDriver = new EdgeDriver(edgeOptions);

Browser: Microsoft Edge 44.18362.449 and Microsoft EdgeHTML 18.18363

DebanjanB
  • 118,661
  • 30
  • 168
  • 217
vfirma
  • 160
  • 2
  • 10
  • Include your Edge browser version# and driver initialization code. – pcalkins Mar 05 '20 at 20:39
  • Please check my edit – vfirma Mar 05 '20 at 20:45
  • don't know about version 44... but for the other one I think you just need to install the driver: "Microsoft WebDriver for Microsoft Edge version 18 is 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": https://developer.microsoft.com/en-us/microsoft-edge/tools/webdriver/ – pcalkins Mar 05 '20 at 20:52

2 Answers2

1

You may just need to install the driver: "Microsoft WebDriver for Microsoft Edge version 18 is 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": https://developer.microsoft.com/en-us/microsoft-edge/tools/webdriver/

pcalkins
  • 868
  • 9
  • 17
  • After running this command, I am still getting an error. Where can I get the executable produced by this command? – vfirma Mar 05 '20 at 21:22
  • it'll be in system32 or syswow64 directory. I believe your PATH variable will be set, though so you shouldn't need to set a path. Use just "new EdgeDriver()" and see if that helps. – pcalkins Mar 05 '20 at 21:32
  • you may need to remove your current references to nuget package and re-build as per the answer here: https://stackoverflow.com/questions/55249358/c-sharp-selenium-testing-with-ms-edge-driver – pcalkins Mar 05 '20 at 21:35
  • 1
    Working after removing all the older exes. Thanks! – vfirma Mar 05 '20 at 21:56
0

Is it the same version between the driver and your version of edge?. The Edge version can be checked on the Menú > Settings > About this app. This is a common error with the Selenium Web Driver, hope this helps you :)

Manuel Miranda
  • 55
  • 1
  • 1
  • 6