用IOS实时设备Appium 1.5.3无法启动Appium

时间:2016-09-26 16:04:39

标签: ios selenium appium appium-ios

它过去有效。但最近我不能用iOS真实设备启动Appium了。我的环境如下:

  • Appium 1.5.3
  • XCode 7.3
  • iOS 9.1

我使用selenium和io.appium如下

    <dependency>
        <groupId>org.seleniumhq.selenium</groupId>
        <artifactId>selenium-java</artifactId>
        <version>2.53.0</version>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>io.appium</groupId>
        <artifactId>java-client</artifactId>
        <version>4.0.0</version>
    </dependency>

每当我开始测试时,我总是在创建iOSDriver

时遇到此异常
org.openqa.selenium.WebDriverException: An unknown server-side error occurred while processing the command. Original error: Removing com.project.classname failed (WARNING: The server did not provide any stacktrace information)

我用Google搜索来自iOS 10和XCode 8,他们不支持UI自动化。我仍然使用iOS 9和XCode 7.有没有人有同样的问题和任何解决方案。我有点被困在这里。感谢

这是来自Appium的日志文件

[debug] [iOS] Running ios real device reset flow

[debug] [iOS] Full reset requested. Will try to uninstall the app 'com.project.classname'.
[debug] [iOS] Creating iDevice object with udid 5571568ad437d17f705f6645d73ef78ea5e72e7b

[iOS] Could not remove 'com.project.classname' from device

[MJSONWP] Encountered internal error running command: Error: Removing com.project.classname failed
at /Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-ios-driver/node_modules/node-idevice/main.js:145:6
at ChildProcess.exithandler (child_process.js:193:7)
at emitTwo (events.js:100:13)
at ChildProcess.emit (events.js:185:7)
at maybeClose (internal/child_process.js:850:16)
at Socket.<anonymous> (internal/child_process.js:323:11)
at emitOne (events.js:90:13)
at Socket.emit (events.js:182:7)
at Pipe._onclose (net.js:475:12)

[HTTP] <-- POST /wd/hub/session 500 973 ms - 175 

1 个答案:

答案 0 :(得分:0)

尝试查看问题是否与libimobiledevice或设备锁定有关

使用该命令安装它: brew install libimobiledevice --HEAD

也尝试使用此命令 sudo chmod -R 777 / var / db / lockdown /