Appium ios11.4.1APP 自动化如何实现,,目前使用 xcode8,appium 1.8.1,但是 appium 启动会提示 could not obtanin screen,其他都能正常使用就是无法截图,这个怎么解?

TD · 2018年09月25日 · 最后由 TD 回复于 2018年09月26日 · 1836 次阅读

[JSONWP] Encountered internal error running command:Error:Unable to take screenshot. WDA returned '{}'

共收到 10 条回复 时间 点赞

用 idevicescreenshot 截图

Appium 逐步开始放弃兼容 Xcode8 IDE,尽快更新到 Xcode9.3 以上的版本在试试

TD #4 · 2018年09月25日 Author
笑哼 回复

用 idevicescreenshot 截图的时候提示 could not connect to lockdowd ,error code -3,然后我按照百度的卸载重装 ideviceinstaller ,chmod -777 等还是不行

TD 回复

尝试一下这样操作:

ERROR: Could not connect to lockdownd, error code -5

brew uninstall ideviceinstaller
brew uninstall libimobiledevice( brew uninstall --ignore-dependencies libimobiledevice)
brew install --HEAD libimobiledevice
brew link --overwrite libimobiledevice
brew install ideviceinstaller
brew link --overwrite ideviceinstaller

sudo chmod -R 777 /var/db/lockdown/
TD #7 · 2018年09月25日 Author
adfghzhang 回复

还是一样的报错 could not connect to lockdowd ,error code -3,应该不是权限的问题,感觉和系统有关系,我换了一个 10.2.1 的手机插在这台电脑上面执行 idevicescreenshot 能够生成一个.tiff 文件而且 appium 能后显示手机界面(截图),没有报错。换成 11.4.1 的就报-3 的错误

TD #1 · 2018年09月25日 Author
ltyd5788 回复

我换成 xcode9.2 之后,下载你给你那个链接的 webdriveragent,build 的时候报了一些错误要怎么处理啊?ios 不是很熟,看不太懂

TD #8 · 2018年09月25日 Author
TD 回复

'CocoaAsyncSocket/CocoaAsyncSocket.h' file not found 现在只剩下这个错误了

看下 readme,执行./Script/build.sh 脚本文件,还有错误查下 google 搜搜

TD #10 · 2018年09月26日 Author
ltyd5788 回复

嗯嗯,可以了,谢谢

需要 登录 后方可回复, 如果你还没有账号请点击这里 注册