4
我無法在設備和模擬器上運行我的腳本。 它提供了以下錯誤:獲取錯誤:請確保在Appium中指定'deviceName'功能v1.0.0
error: Could not determine your device from Appium arguments or desired capabilities.
Please make sure to specify the 'deviceName' capability
它與Appium v0.18.2早期工作,但是當我更新到V1.0.0 - 獵戶座,它給這個錯誤。
我試着用:
[1] capabilities.setCapability("deviceName", "iPhone Simulator");
[2] capabilities.setCapability("device", "iPhone Simulator");
[3] capabilities.setCapability("device", "iPhone");
[4] capabilities.setCapability("deviceName", "iPhone");
我的其他capabilties設置如下:
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability(CapabilityType.BROWSER_NAME, "iOS");
capabilities.setCapability(CapabilityType.VERSION, "7.1");
capabilities.setCapability(CapabilityType.PLATFORM, "Mac");
capabilities.setCapability("app", "/Users/smriti/Abc.app");
driver = new RemoteWebDriver(new URL("http://127.0.0.1:4723/wd/hub"), capabilities);
哪裏需要設置此設備名稱。 任何幫助,將不勝感激。
我們可以請有例外的答案在這裏 – nullpointer