I'm working in multiple browser testing. It was working code with chrome browser. Recently I have installed "Install-Package Selenium.WebDriver -Version 4.0.0-alpha04".

MSedge Chromium and chrome working in setup method, But while navigate/return back to actual [Test] test method encountered the below error.

Error:Message: System.TypeLoadException : Could not load type 'OpenQA.Selenium.Internal.IWrapsElement' from assembly 'WebDriver, Version=, Culture=neutral, PublicKeyToken=null'

Is this dll/package confused

public void Setup()
   string Browsername = "Chrome";
   switch (Browsername)
      case "Chrome":
      driver = new ChromeDriver();

public void XXXX()
       driver.Manage().Timeouts().ImplicitWait (TimeSpan.FromSeconds(200));
       Login login = new Login(driver);
       login.PerformLogin(Login.email_id1, Login.pswd1);

4 Answers 4


I encountered the same error.

I had to uninstall (WebDriver -Version 4.0.0-alpha04) and reinstall the Selenium.Support and Selenium.WebDriver.

The problem is resolved with Selenium Support 3.141.0 and Selenium WebDriver 3.141.0.


I think you need to double check the usings and recompile. OpenQA.Selenium.Internal should be OpenQA.Selenium. You are trying to call a moved interface.

Per v4.0.0a1 in https://github.com/SeleniumHQ/selenium/blob/master/dotnet/CHANGELOG "Moved IWrapsDriver and IWrapsElement from the OpenQA.Selenium.Internal namespace to the OpenQA.Selenium namespace. This should be a no-op for the vast majority of users, requiring only a recompile of code, given that both of these interfaces feature return types in the base namespace, meaning that users likely already have "using" statements for the root namespace in their source. If errors are encountered, changing the namespace in the code and rebuilding should resolve the error."

Source: IWrapsElement Error on Protractor 0.12.0 and Selenium.WebDriver 4.0.0-alpha01 #82

  • I checked in my code, i haven't use the OpenQA.Selenium.Internal used only OpenQA.Selenium. I have removed the the namespace NUnit.Framework.Internal also. Mar 3, 2020 at 12:52
  • Maybe another library is using it? Mar 3, 2020 at 13:33
  • after uninstallation of "Install-Package Selenium.WebDriver -Version 4.0.0-alpha04" its working, shall i try alpha03 version? Mar 3, 2020 at 14:17
  • 1
    Dont you have a stack-trace? There is some line of code that is triggering this, you want to know which one. Mar 3, 2020 at 15:20
  • In pagefactory getting error, in call stack got the error message like ((OpenQA.Selenium.Remote.RemoteWebDriver)driver).ApplicationCache = '((OpenQA.Selenium.Remote.RemoteWebDriver)driver).ApplicationCache' threw an exception of type 'System.InvalidOperationException' Mar 3, 2020 at 16:08

Update the version of the Selenium Support package you are using to the same version number as the Selenium WebDriver package.

That is, if you've upgraded to Selenium WebDriver 4.0.0-rc2 and you're also using the Selenium Support package, then you need to upgrade the Selenium Support package version to 4.0.0-rc2.


The same for me, The problem was resolved only after updating Selenium Support and Selenium WebDriver to 3.141.0.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.