过去起作用了。但最近我不能再用iOS真正的设备启动Appium了。我的环境如下:
我使用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)我在谷歌上搜索了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 发布于 2017-04-16 18:15:25
尝试查看问题是否与libimobiledevice或设备锁定有关。
使用该命令安装它: brew安装libimobiledevice -HEAD
还尝试使用以下命令sudo 777 /var/db/lockdown/
https://stackoverflow.com/questions/39707461
复制相似问题