iOS自動(dòng)化真機(jī)測(cè)試驗(yàn)證環(huán)境過(guò)程中常見(jiàn)問(wèn)題解析
本章節(jié)主要講解 iOS 自動(dòng)化真機(jī)配置以及在 iOS 真機(jī)執(zhí)行自動(dòng)化時(shí)常見(jiàn)問(wèn)題與解決方法。
真機(jī)使用的Capability
與模擬器不同,真機(jī)測(cè)試需要如下的 Capability
方式一:設(shè)置 App 路徑,啟動(dòng) App(自動(dòng)安裝 App)
{
?"app": "/Users/seveniruby/Library/Developer/Xcode/DerivedData/UICatalog-ftyzdbgapjmxxobezrnrxsshpdqh/Build/Products/Debug-iphoneos/UICatalog.app",
?"automationName": "XCUITest",
?"platformName": "ios",
?"xcodeOrgId": "xxxxxx",
?"xcodeSigningId": "iPhone Developer",
?"udid": "9df22446af15919c494c85b4c1c8b00eaa3a5bd0"
}
方式二:根據(jù) App 包名啟動(dòng) App
{
?"platformName": "ios",
?"bundleId": "com.example.apple-samplecode.UICatalog",
?"automationName": "XCUITest",
?"deviceName": "iPhone",
?"udid": "auto",
?"xcodeOrgId": "xxxxx",
?"xcodeSigningId": "iPhone Developer"
}
使用Appium Desktop驗(yàn)證環(huán)境
以上步驟完成后,出現(xiàn)下圖表示真機(jī)環(huán)境配置成功

常見(jiàn)問(wèn)題
問(wèn)題一
問(wèn)題二
問(wèn)題三
解決方法:重啟手機(jī)或者拔掉 IOS 數(shù)據(jù)線,重新連接電腦
問(wèn)題四
note: Using new build system
note: Building targets in parallel
note: Planning build
note: Constructing build description
error: No signing certificate "iOS Development" found: No "iOS Development" signing certificate matching team ID "L62JHCGMQW" with a private key was found. (in target 'WebDriverAgentLib' from project 'WebDriverAgent')
error: No profiles for 'com.facebook.WebDriverAgentRunner.xctrunner' were found: Xcode couldn't find any iOS App Development provisioning profiles matching 'com.facebook.WebDriverAgentRunner.xctrunner'. Automatic signing is disabled and unable to generate a profile. To enable automatic signing, pass -allowProvisioningUpdates to xcodebuild. (in target 'WebDriverAgentRunner' from project 'WebDriverAgent')
問(wèn)題五
Assertions: System: Early unexpected exit, operation never finished bootstrapping - no restart will be
attempted. (Underlying Error: The test runner exited with code 74 before checking in. If you believe this
error represents a bug, please attach the result bundle at
/Users/dzkair/Library/Developer/Xcode/DerivedData/WebDriverAgent-
alwvnomvwrdtzoaxbbkniqrpcdpp/Logs/Test/Test-WebDriverAgentRunner-2020.11.26_10-47-38-+0800.xcresult)
解決方法:重新插拔手機(jī)即可
常見(jiàn)問(wèn)題給大家總結(jié)了這些,如果大家有遇到其他的問(wèn)題也可以在下方留言哦~