美文网首页
Xcode运行Webdriveragent报错

Xcode运行Webdriveragent报错

作者: 书香依旧 | 来源:发表于2019-03-31 16:30 被阅读0次
  • 前提:Xcode路径正常、Xcode登录开发者账号正确、Webdrivergent修改正确、Appium安装正确、Appium-doctor检测正常、连接真机;
  • 问题:在做Appium自动化时,Webdriveragent在Xcode上已经修改了对应的内容后,Test出现以下错误
Testing couldn’t begin on the device “***“: Logic Testing Unavailable
Logic Testing on iOS devices is not supported. You can run logic tests on the Simulator.

解决方法:
修改Product中Scheme改为WebDriverAgentRunner,连接真机,再次Test就不会报错了


Xcode

来补充一下我遇到过的坑
一、Xcode构建时错误Messaging unqualified id
参考来自:https://www.cnblogs.com/iamluoli/p/11083496.html
我用的方法二,把配置文件/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Configurations/ProjectSettins.xcconfig
中的

WARNING_CFLAGS = $(inherited) -Weverything -Wno-objc-missing-property-synthesis -Wno-unused-macros -Wno-disabled-macro-expansion -Wno-gnu-statement-expression -Wno-language-extension-token -Wno-overriding-method-mismatch -Wno-missing-variable-declarations -Rno-module-build -Wno-auto-import -Wno-objc-interface-ivars -Wno-documentation-unknown-command -Wno-reserved-id-macro -Wno-unused-parameter -Wno-gnu-conditional-omitted-operand -Wno-explicit-ownership-type -Wno-date-time -Wno-cast-align -Wno-cstring-format-directive -Wno-double-promotion -Wno-partial-availability

改成如下

WARNING_CFLAGS = $(inherited) -Weverything -Wno-objc-missing-property-synthesis -Wno-unused-macros -Wno-disabled-macro-expansion -Wno-gnu-statement-expression -Wno-language-extension-token -Wno-overriding-method-mismatch -Wno-missing-variable-declarations -Rno-module-build -Wno-auto-import -Wno-objc-interface-ivars -Wno-documentation-unknown-command -Wno-reserved-id-macro -Wno-unused-parameter -Wno-gnu-conditional-omitted-operand -Wno-explicit-ownership-type -Wno-date-time -Wno-cast-align -Wno-cstring-format-directive -Wno-double-promotion -Wno-partial-availability -Wno-objc-messaging-id

保存后,再build就不会报这个Messaging unqualified id了

二、Xcode构建时提示'RoutingHTTPServer/RoutingConnection.h' file not found(appium1.10.1)
参考来自:https://testerhome.com/topics/18373
在WebDriverAgent的目录下执行

$ ./Scripts/bootstrap.sh

结果执行的时候有很多依赖包报错,我又去直接git下最新的WebDriverAgent

$ git clone https://github.com/facebook/WebDriverAgent

然后把下载下来的文件覆盖到appium的WebDriverAgnet路径

相关文章

网友评论

      本文标题:Xcode运行Webdriveragent报错

      本文链接:https://www.haomeiwen.com/subject/fnoybqtx.html