Appium 遇到 Unable to launch WebDriverAgent because of xcodebuild failure: xcodebuild failed with code 65 的解决方法

fdeferf · 2017年03月22日 · 最后由 fionawei 回复于 2017年08月16日 · 3445 次阅读

运行时提示

Unable to launch WebDriverAgent because of xcodebuild failure: xcodebuild failed with code 65

解决方法:

开发者账号:

使用 AppiumDesktop 启动 Appium

AppiumDesktop 中加入 xcodeOrgId 和 xcodeSigningId 字段

TeamID 在 https://developer.apple.com/account/ 里左侧的 Member ship 中找到

使用命令启动 Appium

在执行测试文件的desired_capabilities配置中添加相关字段

{
       "xcodeOrgId": "<Team ID>",
       "xcodeSigningId": "iPhone Developer"
}

仅第一次需要以上字段。
如果上面的设置运行后还不成功,继续遵循下面的设置

免费 Apple ID 账号

  1. 在 appium 的出错日志中找到 WebDriverAgent 的位置,打开进行签名

    [XCUITest] Using WDA path: '/usr/local/lib/node_modules/appium/node_modules/.2.23.1@appium-xcuitest-driver/WebDriverAgent'
    
  2. 更改 WebDriverAgentBundleID ,原来是com.facebook.WebDriverAgentLib,我建议把facebook改为你的名字或公司的名字,这里还有个坑,改完这个之后发现还是提示有错误,最后在Build Settings里的Product Bundle Identifier里再修改一下。

  3. 点击上面菜单栏的 Product -> Test 运行
    第一次运行会提示没有权限,打开真机上的设置 App,通用 -> 描述文件与设备管理,找到你的邮箱,选择信任,再继续执行 test,成功启动后就说明可以了,执行完毕后点击停止。

  4. 没有了,打开 appium 测试吧

听说免费 Apple ID 账号 7 天后会过期,需要重新签名,这个我没有试过

如果觉得我的文章对您有用,请随意打赏。您的支持将鼓励我继续创作!
共收到 2 条回复 时间 点赞
需要 登录 后方可回复, 如果你还没有账号请点击这里 注册