0

I upgraded selenium package from 3.141.0 to 4.2.0. now I am getting the issue while I am trying to run the functional tests. below is the error which I am getting:

System.TypeLoadException : Could not load type 'OpenQA.Selenium.Remote.IHasSessionId' from assembly 'WebDriver, Version=4.0.0.0, Culture=neutral, PublicKeyToken=null'.

strange thing is if I run the single functional test it is running successfully.

packages used in project:

  • Selenium :4.2.0
  • Selenium.Support:4.2.0
  • Selenium.WebDriver.ChromeDriver: 102.0.5005.6102
  • xunit: 2.4.5
Deepak Singh
  • 116
  • 1
  • 1
  • 10
  • Is this [https://stackoverflow.com/questions/68725481/could-not-load-type-openqa-selenium-internal-iwrapselement-from-assembly-webd] your issue – Akzy Jun 01 '22 at 08:24
  • nope I am not getting IWrapElements issue. I am getting is for sessionId. I am upgrading from Selenium 3 to 4. Note: I do not have the "DotNetSeleniumExtras" package also. – Deepak Singh Jun 01 '22 at 08:48

1 Answers1

0

after giving my whole life in digging down the problem. I came to know that my project is using libraries which is been created by other team to handle common things for automation testing. I am working in enterprise application so there are so many libraries which is been built by architect team to handle the and implement the basic patterns. If you are facing the same issue, please confirm before which version of Selenium is been used by other custom libraries and then update accordingly.

Deepak Singh
  • 116
  • 1
  • 1
  • 10