本章节主要讲解 iOS 自动化真机配置以及在 iOS 真机执行自动化时常见问题与解决方法。
真机使用的Capability
与模拟器不同,真机测试需要如下的 Capability
方式一:设置 App 路径,启动 App(自动安装 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"
}
方式二:根据 App 包名启动 App
{
"platformName": "ios",
"bundleId": "com.example.apple-samplecode.UICatalog",
"automationName": "XCUITest",
"deviceName": "iPhone",
"udid": "auto",
"xcodeOrgId": "xxxxx",
"xcodeSigningId"