I have a a WPF, c#, .net 4.8, app using Selenium.WebDriver.MSEdgeDriver.
I built this 8 months ago when Edge was version was 88.x and to day I tried to run it and got errors saying that it could not find or was not compatible with version 88.x. So I went to nuget and upgraded:
Selenium.WebDriver.MSEdgeDriver to 91.0.864.37
and
Selenium.WebDriver to 3.141.0
Now the using: "using Microsoft.Edge.SeleniumTools;" was not recognized and I had to add: "using OpenQA.Selenium.Edge;"
Now for the code:
var options = new EdgeOptions();
options.UseChromium = true;
options.Bin
I get compile errors on "UseChromium" and "BinaryLocation" as follows:
'EdgeOptions' does not contain a definition for 'UseChromium' and no accessible extension method 'UseChromium' accepting a first argument of type 'EdgeOptions' could be found (are you missing a using directive or an assembly reference?)
I googled this and found only a few items and they were not related.
==========================================================
A few easy steps to recreate this problem:
Using these instructions and the section “Using Selenium 4”:
https://docs.microsoft.com/en-us/microsoft-edge/webdriver-chromium/?tabs=c-sharp
Create a new console app.
Installation of Selenium libraries for C# can be done using NuGet:
Using package manager
Install-Package Selenium.WebDriver
Add the reference to WebDriver in the project
And here you can see the error.
In another project I used “Manage Nuget Packages” and installed these and still get the same problem.
This should be really easy and it was no problem 8 months ago.
Any idea how I can get this straightened out?
Thanks.
