通过使用 cnpm install -g appium@1.7.1
安装 appium,安装成功了,并且WebDriverAgent.xcodeproj
文件也配置好了
最后一步就是测试是否能够正确创建爱你 WDA,使用xcodebuild -project WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination 'id=真机的udid' test
测试
并没有报TEST FAILED
,而是报了下面的一串[AXValidations] UIAccessibility Error adding
请大佬帮忙解读解读
2018-02-24 10:15:57.877 xcodebuild[1926:35591] IDETestOperationsObserverDebug: Writing diagnostic log for test session to:
/var/folders/7c/bgvs_0fd41jf7z725zvd_87h0000gp/T/com.apple.dt.XCTest/IDETestRunSession-7E150187-E752-4F40-A07B-60D73D244A68/WebDriverAgentRunner-8D9E0731-C6C5-4F2F-8FEF-D17AFA1D61F2/Session-WebDriverAgentRunner-2018-02-24_101557-68s8yB.log
2018-02-24 10:15:57.880 xcodebuild[1926:35589] [MT] IDETestOperationsObserverDebug: (0F10E01E-0DF3-497D-A8F8-71E9D371F0CB) Beginning test session WebDriverAgentRunner-0F10E01E-0DF3-497D-A8F8-71E9D371F0CB at 2018-02-24 10:15:57.880 with Xcode 9C40b on target <DVTiOSDevice: 0x7fb944a42970> {
deviceSerialNumber: DMQRDMLRG5VV
identifier: 真机的udid
deviceClass: iPad
deviceName: vcy's
deviceIdentifier: 真机的udid
productVersion: 11.2.1
buildVersion: 15C153
deviceSoftwareVersion: 11.2.1 (15C153)
deviceArchitecture: arm64
deviceTotalCapacity: 12717416448
deviceAvailableCapacity: 4612104192
deviceIsTransient: NO
ignored: NO
deviceIsBusy: NO
deviceIsActivated: YES
deviceActivationState: Activated
isPasscodeLocked: NO
deviceType: <DVTDeviceType:0x7fb944839e50 Xcode.DeviceType.iPhone>
supportedDeviceFamilies: (
1,
2
)
applications: (null)
provisioningProfiles: (null)
hasInternalSupport: NO
isSupportedOS: YES
developerDiskMountError: (null)
(null)
bootArgs: <unavailable>
connected: yes
isWirelessEnabled: no
connectionType: direct
} (11.2.1 (15C153))
=== BUILD TARGET WebDriverAgentLib OF PROJECT WebDriverAgent WITH CONFIGURATION Debug ===
Check dependencies
=== BUILD TARGET WebDriverAgentRunner OF PROJECT WebDriverAgent WITH CONFIGURATION Debug ===
Check dependencies
writeDictToFile:1278 ==== Successfully wrote Manifest cache to /var/folders/7c/bgvs_0fd41jf7z725zvd_87h0000gp/C/com.apple.DeveloperTools/All/Xcode/EmbeddedAppDeltas/b7ccc0c2a2ff096ac27da8378e464d60/2600ede04135ffc36df6c6e57cf2b4ad34c52f96/ManifestCache.plist
2018-02-24 10:16:04.185088+0800 WebDriverAgentRunner-Runner[678:346578] Running tests...
2018-02-24 10:16:05.132489+0800 WebDriverAgentRunner-Runner[678:346578] [AXValidations] UIAccessibility Error adding -[PHAsset accessibilityLabel]
2018-02-24 10:16:05.132596+0800 WebDriverAgentRunner-Runner[678:346578] [AXValidations] UIAccessibility Error adding -[PHAsset accessibilityValue]
2018-02-24 10:16:05.132673+0800 WebDriverAgentRunner-Runner[678:346578] [AXValidations] UIAccessibility Error adding -[PHAsset accessibilityTraits]
2018-02-24 10:16:05.132792+0800 WebDriverAgentRunner-Runner[678:346578] [AXValidations] UIAccessibility Error adding -[PHAsset _accessibilitySavePhotoLabel:]
2018-02-24 10:16:05.132942+0800 WebDriverAgentRunner-Runner[678:346578] [AXValidations] UIAccessibility Error adding +[PHAsset safeCategoryBaseClass]
2018-02-24 10:16:05.133753+0800 WebDriverAgentRunner-Runner[678:346578] [AXValidations] UIAccessibility Error adding -[CAMLightingControl accessibilityLabel]
2018-02-24 10:16:05.133849+0800 WebDriverAgentRunner-Runner[678:346578] [AXValidations] UIAccessibility Error adding -[CAMLightingControl accessibilityValue]
2018-02-24 10:16:05.133929+0800 WebDriverAgentRunner-Runner[678:346578] [AXValidations] UIAccessibility Error adding -[CAMLightingControl accessibilityTraits]
2018-02-24 10:16:05.133999+0800 WebDriverAgentRunner-Runner[678:346578] [AXValidations] UIAccessibility Error adding -[CAMLightingControl isAccessibilityElement]
2018-02-24 10:16:05.134115+0800 WebDriverAgentRunner-Runner[678:346578] [AXValidations] UIAccessibility Error adding -[CAMLightingControl accessibilityIncrement]
2018-02-24 10:16:05.134207+0800 WebDriverAgentRunner-Runner[678:346578] [AXValidations] UIAccessibility Error adding -[CAMLightingControl accessibilityDecrement]
2018-02-24 10:16:05.134281+0800 WebDriverAgentRunner-Runner[678:346578] [AXValidations] UIAccessibility Error adding +[CAMLightingControl safeCategoryBaseClass]
2018-02-24 10:16:05.134506+0800 WebDriverAgentRunner-Runner[678:346578] [AXValidations] UIAccessibility Error adding -[PLManagedAsset accessibilityLabel]
2018-02-24 10:16:05.134576+0800 WebDriverAgentRunner-Runner[678:346578] [AXValidations] UIAccessibility Error adding -[PLManagedAsset accessibilityValue]
2018-02-24 10:16:05.134640+0800 WebDriverAgentRunner-Runner[678:346578] [AXValidations] UIAccessibility Error adding -[PLManagedAsset accessibilityTraits]
2018-02-24 10:16:05.134706+0800 WebDriverAgentRunner-Runner[678:346578] [AXValidations] UIAccessibility Error adding -[PLManagedAsset _accessibilityPhotoDescription]
2018-02-24 10:16:05.134771+0800 WebDriverAgentRunner-Runner[678:346578] [AXValidations] UIAccessibility Error adding +[PLManagedAsset safeCategoryBaseClass]
2018-02-24 10:16:05.167430+0800 WebDriverAgentRunner-Runner[678:346578] Continuing to run tests in the background with task ID 1
Test Suite 'All tests' started at 2018-02-24 10:16:05.898
Test Suite 'WebDriverAgentRunner.xctest' started at 2018-02-24 10:16:05.901
Test Suite 'UITestingUITests' started at 2018-02-24 10:16:05.902
Test Case '-[UITestingUITests testRunner]' started.
t = 0.00s Start Test at 2018-02-24 10:16:05.908
t = 0.01s Set Up
2018-02-24 10:16:05.934902+0800 WebDriverAgentRunner-Runner[678:346578] Built at Feb 24 2018 10:14:05
2018-02-24 10:16:05.990397+0800 WebDriverAgentRunner-Runner[678:346578] ServerURLHere->http://192.168.31.134:0<-ServerURLHere