问题
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