運行時提示
Unable to launch WebDriverAgent because of xcodebuild failure:xcodebuild failed with code 65
解決方法:
1開發者賬號:
使用AppiumDesktop啓動Appium
AppiumDesktop中加入 xcodeOrgId 和xcodeSigningId 字段
TeamID 在 https://developer.apple.com/account/ 裏左側的 Membership 中找到
使用命令啓動Appium
在執行測試文件的desired_capabilities配置中添加相關字段
{
"xcodeOrgId":"<TeamID>",
"xcodeSigningId":"iPhoneDeveloper"
}
僅第一次需要以上字段。
2免費Apple ID賬號
在appium的出錯日誌中找到WebDriverAgent的位置,打開進行簽名
[XCUITest] Using WDA path:'/usr/local/lib/node_modules/appium/node_modules/.2.23.1@appium-xcuitest-driver/WebDriverAgent'
更改 WebDriverAgent 的BundleID ,原來是com.facebook.WebDriverAgentLib,我建議把facebook改爲你的名字或公司的名字,這裏還有個坑,改完這個之後發現還是提示有錯誤,最後在BuildSettings裏的Product Bundle Identifier裏再修改一下。
點擊上面菜單欄的Product-> Test運行
第一次運行會提示沒有權限,打開真機上的設置App,通用 ->描述文件與設備管理,找到你的郵箱,選擇信任,再繼續執行test,成功啓動後就說明可以了,執行完畢後點擊停止。
沒有了,打開appium測試吧
免費 Apple ID 賬號7天后會過期,需要重新簽名
作者作品:
《Selenium、Appium、OkHttp自動化測試實戰》
https://yuedu.baidu.com/ebook/1e229edbbdeb19e8b8f67c1cfad6195f302be803
《Selenium、Appium、Requests自動化測試實戰Python版》
https://yuedu.baidu.com/ebook/fd0737a709a1284ac850ad02de80d4d8d05a0160
《Fiddler使用教程》
https://yuedu.baidu.com/ebook/eb57a65de97101f69e3143323968011ca300f73d