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=0.0.0.0, Culture=neutral, PublicKeyToken=null’
Is this dll/package confused
[SetUp]
public void Setup()
{
string Browsername = “Chrome”;
switch (Browsername)
{
case “Chrome”:
driver = new ChromeDriver();
}
}
[Test]
[Obsolete]
public void XXXX()
{
try
{
driver.Navigate().GoToUrl(UrlList.XXXX_Login);
driver.Manage().Timeouts().ImplicitWait (TimeSpan.FromSeconds(200));
driver.Manage().Window.Maximize();
Login login = new Login(driver);
login.PerformLogin(Login.email_id1, Login.pswd1);
}
}
Source: Read More