小编典典

System.TypeLoadException:类型'OpenQA.Selenium.Appium.Service.AppiumCommandExecutor'中的方法'Dispose'

selenium

我的项目停止工作。我拥有所有nuget和appium服务器的最新版本。哪里有问题?我收到这样的错误:

信息:

OneTimeSetUp:System.TypeLoadException:程序集“ appium-dotnet-driver,Version =
3.0.0.2,Culture = neutral,PublicKeyToken =
null”中类型’OpenQA.Selenium.Appium.Service.AppiumCommandExecutor’中的’Dispose’方法没有实施。**

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

阅读 390

收藏
2020-06-26

共1个答案

小编典典

OneTimeSetUp:System.TypeLoadException:程序集“ appium-dotnet-driver,Version =
3.0.0.2,Culture = neutral,PublicKeyToken =
null”中类型’OpenQA.Selenium.Appium.Service.AppiumCommandExecutor’中的’Dispose’方法没有
通过将硒NuGet包降级到3.11.2得到解决*

2020-06-26