ITimeouts不包含Appium中的ImplicitWait的定义

时间:2019-03-30 06:25:27

标签: appium appium-desktop

我正在尝试从https://github.com/Microsoft/WinAppDriver/tree/master/Samples/C%23/CalculatorTest使用此计算器示例,但无法解决“ ImplicitWait”问题。 VS建议使用ImplicitlyWait,但仍然无法正常工作。我有一个appium.webdriver v3.0.0.2,该示例仍在使用预览版本。

完整错误消息:

ITimeouts does not contain a definition for 'ImplicitWait' and no accessible extension method 'ImplicitWait' accepting a first argument of type 'ITimeouts' could be found (are you missing a using directive or an assembly reference?)

代码:

public static void Launch(TestContext context)
{
   var appCapabilities = new DesiredCapabilities();
   appCapabilities.SetCapability("app", AppId);
   appCapabilities.SetCapability("deviceName", "WindowsPC");
   appCapabilities.SetCapability("platformName", "Windows");
   session = new WindowsDriver<WindowsElement>(new Uri(DriverUrl), appCapabilities);
   Assert.IsNotNull(session);
   session.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(1.5);
}

0 个答案:

没有答案