请在下面找到错误日志。错误显示如下
org.openqa.selenium.WebDriverException:未知的服务器端错误 处理命令时发生。原始错误:找不到 要启动的设备。您要求提供iPhone(9.3)',但可用 设备是:[" Apple TV 1080p(9.2) [C0018F88-126A-44FC-B30E-0BE88297A86E](模拟器)","测试(8.1) [AA98A16E-41EB-4A35-B72F-6988676F9EC3](模拟器)"," iPad 2(8.1) [C2460104-58F5-42B7-A51A-2BEE61D52F20](模拟器)"," iPad 2(8.4) [C92A7395-9758-4A95-8656-ECF2988C1195](模拟器)"," iPad 2(9.3) [C62B64FF-9942-44F7-BF7A-7A8AAF13A4F6](模拟器)"," iPad Air(8.1) [1476073B-AC4A-4483-870A-170E1D2BAA2F](模拟器)"," iPad Air(8.4) [982350B7-7159-4AB6-BEE3-B8457E7B5455](模拟器)"," iPad Air(9.3) [E79CB848-CE03-4C37-A96B-8551B8127AE7](模拟器)"," iPad Air 2(9.3) [0080C3DF-CBF4-422D-8C97-9C902ACCA84B](模拟器)"," iPad Pro(9.3) [0E0CDFBD-A343-422F-A95A-BF1340F8F24C](模拟器)"," iPad Retina(8.1) [AB5B9546-E74E-499E-9A74-DBED6845F2E4](模拟器)"," iPad Retina(8.4) [E099131F-65A3-4C21-8F85-C988F4094C4D](模拟器)"," iPad Retina(9.3) [EAC942D7-77F9-4DDE-9D84-B4DC68148F45](模拟器)"," iPhone 4s(8.1) [2C893F1D-AECE-433B-AA9C-9763D60BE383](模拟器)"," iPhone 4s(8.4) [87EC4666-CA1D-497E-8CEC-411253B07AF7](模拟器)"," iPhone 4s(9.3) [C028CAA4-DE61-4391-AA6F-134377B11543](模拟器)"," iPhone 5(8.1) [82446C48-9BB8-4108-B72C-5E9F7004B9C3](模拟器)"," iPhone 5(8.4) [0F680256-CF75-4D73-9738-4DACF4E18853](模拟器)"," iPhone 5(9.3) [D041D017-79F5-4CD1-8278-768B3B522339](模拟器)"," iPhone 5s(8.1) [244AC4AE-D236-426A-ACD7-1DF23378238B](模拟器)"," iPhone 5s(8.4) [8F88E094-5331-4648-AFD6-195DD051CF1E](模拟器)"," iPhone 5s(9.3) [4488DB16-190B-4E46-92B8-06DD1A01C805](模拟器)"," iPhone 6(8.1) [481B1832-1A87-4E98-9D74-2A2B7D24764D](模拟器)"," iPhone 6(8.4) [0E11A31C-AAF5-44F2-9D1A-05B90967FCEB](模拟器)"," iPhone 6(9.3) [C96F7108-24AD-4E19-9BB4-EDB2DC734D46](模拟器)"," iPhone 6 Plus (8.1)[14666DBC-AAAF-4B39-8E66-52BAA0E3992F](模拟器)"," iPhone 6 加(8.4)[C461ABD8-E5CB-4014-93C5-C7CC860326E9](模拟器)"," iPhone 6加(9.3)[16C3C439-B246-490F-80CA-361CD99F1EB9] (模拟器)"," iPhone 6s(9.3)[9CE696EC-FEB8-4B6D-A93C-B9EC3580D085] (模拟器)"," iPhone 6s(9.3)+ Apple Watch - 38mm(2.2) [ADD11868-8449-4AA3-9D18-2FC290D6AEF4](模拟器)"," iPhone 6s Plus (9.3)[8D389B44-80FD-41B6-BAD8-E3A40A16B41C](模拟器)"," iPhone 6s 加(9.3)+ Apple Watch - 42毫米(2.2) [4A93D3D3-CB38-47D3-A339-725E96B58991](模拟器)"](警告: 服务器没有提供任何堆栈跟踪信息)命令持续时间或 超时:1.23秒构建信息:版本:' 2.51.0',修订版: ' 1af067dbcaedd7d2ab9af5151fc471d363d97193',时间:' 2016-02-05 11:20:57'系统信息:主持人:' vbs-chd-nb96.vserv-it.com',ip: ' 172.17.3.98',os.name:' Mac OS X',os.arch:' x86_64',os.version: ' 10.11.4',java.version:' 1.8.0_60'司机信息: io.appium.java_client.ios.IOSDriver at sun.reflect.NativeConstructorAccessorImpl.newInstance0(原生方法)
答案 0 :(得分:0)
确保以下功能:
capabilities.setCapability("platformVersion", "iOS");
capabilities.setCapability("deviceName", "iPhone 6s (9.3)");
capabilities.setCapability(MobileCapabilityType.UDID, "6gt72bfbi38sehi42"); //change the UDID to your device
// update the name provided by to a one in the list specified in the trace logs
答案 1 :(得分:0)
首先,确认您在
中的设备列表中有可用的名为iPhone 6s的设备xcode -> window -> devices
如果不是通过点击底部的+按钮从那里创建一个新的模拟器。
确保使用以下代码:
capabilities.setCapability(MobileCapabilityType.PLATFORM_VERSION, "9.3");
capabilities.setCapability(MobileCapabilityType.DEVICE_NAME, "iPhone 6s");
capabilities.setCapability(MobileCapabilityType.UDID, "ur id");
capabilities.setCapability(MobileCapabilityType.VERSION, "7.3");
capabilities.setCapability(MobileCapabilityType.PLATFORM,"Mac");
capabilities.setCapability("platformName", "iOS");
另外一个可选的东西,在ur appium IOS设置中,在Force设备选项中,将iphone 6s作为设备
答案 2 :(得分:0)
确保您在appium期望的功能中传递正确的udid。在运行脚本并在终端上点击ideviceinfo并检查你的udid之前。如果它不起作用,那么你可以附上appium日志吗?