构造函数IOSDriver <ioselement>(Capabilitie)指的是缺少的类型功能

时间:2017-06-09 11:44:10

标签: automation appium

当我尝试启动IOSDriver时,我收到以下错误,你能告诉我如何解决这个错误,我尝试了为IOSDriver提到的各种构造函数参数无法解决它。

  

构造函数IOSDriver(Capabilitie)引用了缺失的类型功能“

Appium客户端库:5.0.0-beta6

以下是我的代码段。当我尝试启动IOSDriver时,

DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability(MobileCapabilityType.DEVICE_NAME, "iPhone SE");
capabilities.setCapability(MobileCapabilityType.PLATFORM_VERSION, "10.3");
capabilities.setCapability(MobileCapabilityType.PLATFORM_NAME, "iOS");
capabilities.setCapability(MobileCapabilityType.APPIUM_VERSION, "1.6.5");
capabilities.setCapability("app", "/Users/sachin.kr/Library/Developer/Xcode/DerivedData/WebDriverAgent-brdadhpuduowllgivnnvuygpwhzy/Build/Products/Debug-iphonesimulator");
capabilities.setCapability("automationName", "XCUITest");
driver = new IOSDriver<IOSElement>(new URL("http://127.0.0.1:4723/wd/hub"), capabilities);

1 个答案:

答案 0 :(得分:0)

我认为您的应用路径不正确,您应该添加.app结尾 -

/Users/sachin.kr/Library/Developer/Xcode/DerivedData/WebDriverAgent-brdadhpuduowll​​givnnvuygpwhzy/Build/Products/Debug-iphonesimulator.app

(假设您正在使用模拟器构建)。

请尝试删除<IOSElement>