处理命令时发生未知的服务器端错误。原始错误:命令失败:ideviceinstaller -u

时间:2017-05-22 10:18:23

标签: java ios iphone selenium-webdriver appium-ios

我尝试使用Appium和Selenium在iPhone 6上启动Safari浏览器。

请查看我正在使用的配置详情。

iPhone : 6
MAC : 10.12.4
Xcode : 8.3.2
Appium : 1.5.3

以下是我为启动驱动程序而编写的代码。

desCapabilities = DesiredCapabilities.safari();
desCapabilities.setCapability("platformName","iOS");
desCapabilities.setCapability("deviceName", "iPhone 6");
desCapabilities.setCapability("browserName", "Safari");
desCapabilities.setCapability("platformVersion", "10.3.1");
desCapabilities.setCapability("app", "com.apple.mobilesafari");
desCapabilities.setCapability("udid", "*******");
public static RemoteWebDriver iOSDriver = new IOSDriver<MobileElement>(new URL("http://" + nodeUrl + ":" + nodeUrlPort + "/wd/hub"), desCapabilities);

运行测试时,会抛出以下错误。请提供解决此问题的建议。

org.openqa.selenium.WebDriverException: An unknown server-side error occurred 
while processing the command. Original error: Command failed: ideviceinstaller 
-u <udid> i./Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-ios-driver/build/SafariLauncher/SafariLauncher.app(WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 8.13 seconds
Build info: version: '2.53.1', revision:'a36b8b1cd5757287168e54b817830adce9b0158d', time: '2016-06-30 19:26:09' 
System info: host: 'MacBook.local', ip: '****', os.name: 'Mac OS X', os.arch:'x86_64', os.version: '10.12.4', java.version: '1.7.0_71'
Driver info: io.appium.java_client.ios.IOSDriver

1 个答案:

答案 0 :(得分:1)

您正在使用与xcode 8和ios 10不兼容的appium版本1.5.3。将您的appium更新为1.6或更高版本。

要知道如何在安装appium 1.6后启动appium服务器,请参阅以下链接:

Launch and run appium in Mac