El General Magnifico
El General Magnifico

Reputation: 107

c# - Selenium WebDriver 4 not working with Edge (chromium)

I just updated my test framework to WebDriver 4. Seems Firefox required small tweaks, Chrome works correctly but Edge (chromium) does not work at all. I get a following error:

Could not load type 'OpenQA.Selenium.Remote.CapabilityType' from assembly 'WebDriver, Version=4.0.0.0, Culture=neutral, PublicKeyToken=null'. I have matching Selenium.Support package installed. Has anyone found a fix?

WebDriver 3.141.0 was working quite fine.

Upvotes: 3

Views: 1869

Answers (2)

Ned
Ned

Reputation: 530

The official Microsoft.Edge.SeleniumTools nuget package does not support Selenium 4+, it relies on Selenium.Webdriver 3.141.

The Selenium Tools for Microsoft Edge is a solution for developers who prefer to remain on Selenium 3 which is the current stable release and developers who have existing browser tests and want to add coverage for the new Microsoft Edge (Chromium) browser without changing the Selenium version.

The very same Edge driver classes provided in this package are included in Selenium 4 and are already available today in the latest Selenium 4 Alpha release. 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!

Source

Instead, I am using this community maintained Nuget package for edge and selenium 4+.

Upvotes: 3

El General Magnifico
El General Magnifico

Reputation: 107

I found a problem. I still had microsoft.edge.seleniumTools package added and it caused some odd conflicts with the new library. After removing that It works perfectly.

Upvotes: 2

Related Questions