Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

System.TypeLoadException : Method 'Dispose' in type 'OpenQA.Selenium.Appium.Service.AppiumCommandExecutor'

My project stopped working. I have the newest version of all nugets and appium server. Where is a problem? I receive error like this:

Message:

OneTimeSetUp: System.TypeLoadException : Method 'Dispose' in type 'OpenQA.Selenium.Appium.Service.AppiumCommandExecutor' from assembly 'appium-dotnet-driver, Version=3.0.0.2, Culture=neutral, PublicKeyToken=null' does not have an implementation.**

protected AppiumDriver<AppiumWebElement> driver = null;
private DesiredCapabilities dc = new DesiredCapabilities();

public Driver()
{
    dc.SetCapability("reportDirectory", reportDirectory);
    dc.SetCapability("reportFormat", reportFormat);
    dc.SetCapability("testName", testName);
    dc.SetCapability("deviceName", AppConfigReader.DEVICE_NAME);
    dc.SetCapability("language", "en");
    dc.SetCapability("locale", "UK");
    dc.SetCapability("newCommandTimeout", 120);
    //dc.SetCapability("automationName", "UiAutomator2");
    dc.SetCapability(MobileCapabilityType.Udid, AppConfigReader.DEVICE_NAME);
    dc.SetCapability(AndroidMobileCapabilityType.AppPackage, AppConfigReader.APPLICATION_NAME);
    dc.SetCapability(AndroidMobileCapabilityType.AppActivity, "novacura.flow.client.android.SplashScreen");
    driver = new AndroidDriver<AppiumWebElement>(new Uri(AppConfigReader.HOST), dc);
}
like image 858
SixtySeven Avatar asked Jan 27 '23 20:01

SixtySeven


1 Answers

OneTimeSetUp: System.TypeLoadException : Method 'Dispose' in type 'OpenQA.Selenium.Appium.Service.AppiumCommandExecutor' from assembly 'appium-dotnet-driver, Version=3.0.0.2, Culture=neutral, PublicKeyToken=null' does not have an implementation.* got resolve by downgrading the selenium NuGet package to 3.11.2

like image 147
Pavan N Avatar answered Jan 31 '23 20:01

Pavan N