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

有些话、适合烂在心里 提交于 2019-12-31 01:26:53

问题


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);
}

回答1:


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




回答2:


yes, the above problem is resolved after downgrading selenium Nuget package to 3.11.2



来源:https://stackoverflow.com/questions/54331237/system-typeloadexception-method-dispose-in-type-openqa-selenium-appium-serv

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!