I see a lot of posts about this problem and none of the answers work for me. Using this MS link to create a sample project:
https://learn.microsoft.com/en-us/microsoft-edge/webdriver-chromium/?tabs=c-sharp
Here's what I have and did:
Edge Version 88.0.705.68 (Official build) (64-bit)
I downloaded the correct driver: Version 88.0.705.68, msedgedriver.exe
to: D:\Archive\Downloads\EdgeDriver\Version 88.0.705.68 (nothing to install, just run it)
Choose a WebDriver language binding
The Microsoft Edge team recommends: Install-Package Selenium.WebDriver -Version 4.0.0-alpha07
Selenium Tools for Microsoft Edge/Before you Begin:
"If you are able to upgrade to Selenium 4 Alpha, there is no need to use this package as Selenium should already have everything you need built in!"
I think i did this in the previous step
Add the Microsoft.Edge.SeleniumTools and Selenium.WebDriver packages to your .NET project using the NuGet CLI or Visual Studio.
"Add the Microsoft.Edge.SeleniumTools and Selenium.WebDriver packages to your .NET project using the NuGet CLI or Visual Studio." done
and when I run this code:
var options = new EdgeOptions();
options.UseChromium = true;
var driver = new EdgeDriver(options);
I get this error:
OpenQA.Selenium.DriverServiceNotFoundException
HResult=0x80131500
Message=The msedgedriver.exe file does not exist in the current directory or in a directory on the PATH environment variable. The driver can be downloaded at https://developer.microsoft.com/en-us/microsoft-edge/tools/webdriver/.
Source=WebDriver
StackTrace:
at OpenQA.Selenium.DriverService.FindDriverServiceExecutable(String executableName, Uri downloadUrl)
at OpenQA.Selenium.Edge.EdgeDriverService.CreateDefaultServiceFromOptions(EdgeOptions options)
at OpenQA.Selenium.Edge.EdgeDriver..ctor(EdgeOptions options)
at SeleniumTest2.Program.Main(String[] args) in D:\Apps\zDeleteme\SeleniumTest2\SeleniumTest2\Program.cs:line 35
when I search this error I find answers like this:
https://social.msdn.microsoft.com/Forums/en-US/a6749b18-12c1-4d16-bdbc-35b21adb9e7d/seleniun-c-using-ms-edge-webdriver?forum=vstest
"According to the Error Message, the WebDriver does not exist under the project path. One workaround is that you can copy the file ‘MicrosoftWebDriver.exe’ you have installed to you project path ‘…\your project name\bin\Debug\’, and then debug it again."
but I can't find MicrosoftWebDriver.exe and when I search for that its not found in the locations I see in online answers.
such as C:\Windows\SysWOW64\MicrosoftWebDriver.exe (not there)
or C:\Windows\system32\MicrosoftWebDriver.exe (not here either)
Can someone please lend a hand in sorting this out and get this up and running?
Thank you.