@deque/axe-appium3-webdriveragent 1.7.1 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/WebDriverAgent.xcodeproj/project.pbxproj +61 -3
- package/WebDriverAgentLib/Categories/XCUIApplication+FBHelpers.h +4 -1
- package/WebDriverAgentLib/Categories/XCUIApplication+FBHelpers.m +35 -2
- package/WebDriverAgentLib/Categories/XCUIDevice+FBHelpers.h +6 -0
- package/WebDriverAgentLib/Categories/XCUIDevice+FBHelpers.m +100 -23
- package/WebDriverAgentLib/Categories/XCUIDevice+FBRotation.m +8 -3
- package/WebDriverAgentLib/Categories/XCUIElement+FBTyping.h +7 -0
- package/WebDriverAgentLib/Categories/XCUIElement+FBTyping.m +20 -0
- package/WebDriverAgentLib/Commands/AxeAuthCommands.h +4 -0
- package/WebDriverAgentLib/Commands/AxeAuthCommands.m +113 -56
- package/WebDriverAgentLib/Commands/AxeAutoScanCommands.m +1 -7
- package/WebDriverAgentLib/Commands/AxeScanCommands.m +57 -315
- package/WebDriverAgentLib/Commands/FBCustomCommands.m +8 -0
- package/WebDriverAgentLib/Commands/FBElementCommands.m +12 -5
- package/WebDriverAgentLib/Commands/FBSessionCommands.m +1 -1
- package/WebDriverAgentLib/Info.plist +2 -2
- package/WebDriverAgentLib/Routing/FBSession.m +2 -2
- package/WebDriverAgentLib/Utilities/FBConfiguration.h +2 -0
- package/WebDriverAgentLib/Utilities/FBConfiguration.m +1 -0
- package/WebDriverAgentLib/Utilities/FBHIDOperations.h +41 -0
- package/WebDriverAgentLib/Utilities/FBHIDOperations.m +244 -0
- package/WebDriverAgentLib/Utilities/FBSettings.h +1 -0
- package/WebDriverAgentLib/Utilities/FBSettings.m +1 -0
- package/WebDriverAgentLib/Utilities/FBSettingsHandler.m +26 -2
- package/WebDriverAgentTests/IntegrationApp/Classes/ViewController.m +11 -7
- package/WebDriverAgentTests/IntegrationTests/FBElementAttributeTests.m +44 -0
- package/WebDriverAgentTests/IntegrationTests/FBTypingTest.m +33 -0
- package/WebDriverAgentTests/IntegrationTests/XCUIApplicationHelperTests.m +111 -0
- package/WebDriverAgentTests/IntegrationTests/XCUIDeviceHelperTests.m +97 -0
- package/WebDriverAgentTests/IntegrationTests/XCUIDeviceRotationTests.m +53 -0
- package/WebDriverAgentTests/IntegrationTests_tvOS/FBTVFocusIntegrationTests.m +21 -0
- package/WebDriverAgentTests/IntegrationTests_watchOS/WDAAppLifecycleIntegrationTests.swift +12 -0
- package/axeDevToolsXCUI.xcframework/Info.plist +3 -3
- package/axeDevToolsXCUI.xcframework/LICENSE-3RD-PARTY-axe-devtools-ios.md +1 -1
- package/axeDevToolsXCUI.xcframework/{axe-devtools-ios-4.3.1.cdx.json → axe-devtools-ios-5.0.0.cdx.json} +6 -6
- package/axeDevToolsXCUI.xcframework/{axe-devtools-ios-4.3.1.spdx.json → axe-devtools-ios-5.0.0.spdx.json} +5 -5
- package/axeDevToolsXCUI.xcframework/ios-arm64/axeDevToolsXCUI.framework/Headers/AxeTestBundleObserver.h +0 -1
- package/axeDevToolsXCUI.xcframework/ios-arm64/axeDevToolsXCUI.framework/Headers/axeDevToolsXCUI-Swift.h +82 -228
- package/axeDevToolsXCUI.xcframework/ios-arm64/axeDevToolsXCUI.framework/Info.plist +4 -4
- package/axeDevToolsXCUI.xcframework/ios-arm64/axeDevToolsXCUI.framework/Modules/axeDevToolsXCUI.swiftmodule/arm64-apple-ios.abi.json +3120 -5759
- package/axeDevToolsXCUI.xcframework/ios-arm64/axeDevToolsXCUI.framework/Modules/axeDevToolsXCUI.swiftmodule/arm64-apple-ios.private.swiftinterface +53 -168
- package/axeDevToolsXCUI.xcframework/ios-arm64/axeDevToolsXCUI.framework/Modules/axeDevToolsXCUI.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
- package/axeDevToolsXCUI.xcframework/ios-arm64/axeDevToolsXCUI.framework/Modules/axeDevToolsXCUI.swiftmodule/arm64-apple-ios.swiftinterface +53 -168
- package/axeDevToolsXCUI.xcframework/ios-arm64/axeDevToolsXCUI.framework/axeDevToolsXCUI +0 -0
- package/axeDevToolsXCUI.xcframework/ios-arm64_x86_64-simulator/axeDevToolsXCUI.framework/Headers/AxeTestBundleObserver.h +0 -1
- package/axeDevToolsXCUI.xcframework/ios-arm64_x86_64-simulator/axeDevToolsXCUI.framework/Headers/axeDevToolsXCUI-Swift.h +164 -456
- package/axeDevToolsXCUI.xcframework/ios-arm64_x86_64-simulator/axeDevToolsXCUI.framework/Info.plist +4 -4
- package/axeDevToolsXCUI.xcframework/ios-arm64_x86_64-simulator/axeDevToolsXCUI.framework/Modules/axeDevToolsXCUI.swiftmodule/arm64-apple-ios-simulator.abi.json +3120 -5759
- package/axeDevToolsXCUI.xcframework/ios-arm64_x86_64-simulator/axeDevToolsXCUI.framework/Modules/axeDevToolsXCUI.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +53 -168
- package/axeDevToolsXCUI.xcframework/ios-arm64_x86_64-simulator/axeDevToolsXCUI.framework/Modules/axeDevToolsXCUI.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
- package/axeDevToolsXCUI.xcframework/ios-arm64_x86_64-simulator/axeDevToolsXCUI.framework/Modules/axeDevToolsXCUI.swiftmodule/arm64-apple-ios-simulator.swiftinterface +53 -168
- package/axeDevToolsXCUI.xcframework/ios-arm64_x86_64-simulator/axeDevToolsXCUI.framework/Modules/axeDevToolsXCUI.swiftmodule/x86_64-apple-ios-simulator.abi.json +3120 -5759
- package/axeDevToolsXCUI.xcframework/ios-arm64_x86_64-simulator/axeDevToolsXCUI.framework/Modules/axeDevToolsXCUI.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +53 -168
- package/axeDevToolsXCUI.xcframework/ios-arm64_x86_64-simulator/axeDevToolsXCUI.framework/Modules/axeDevToolsXCUI.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
- package/axeDevToolsXCUI.xcframework/ios-arm64_x86_64-simulator/axeDevToolsXCUI.framework/Modules/axeDevToolsXCUI.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +53 -168
- package/axeDevToolsXCUI.xcframework/ios-arm64_x86_64-simulator/axeDevToolsXCUI.framework/_CodeSignature/CodeResources +25 -25
- package/axeDevToolsXCUI.xcframework/ios-arm64_x86_64-simulator/axeDevToolsXCUI.framework/axeDevToolsXCUI +0 -0
- package/build/lib/webdriveragent.d.ts.map +1 -1
- package/build/lib/webdriveragent.js +1 -2
- package/build/lib/webdriveragent.js.map +1 -1
- package/build/tsconfig.tsbuildinfo +1 -1
- package/lib/webdriveragent.ts +1 -2
- package/package.json +8 -10
package/README.md
CHANGED
|
@@ -10,7 +10,7 @@ WebDriverAgent is a [WebDriver server](https://w3c.github.io/webdriver/webdriver
|
|
|
10
10
|
* Both iOS and tvOS platforms are supported with devices & simulators
|
|
11
11
|
* Implements most of [WebDriver Spec](https://w3c.github.io/webdriver/webdriver-spec.html)
|
|
12
12
|
* Implements part of [Mobile JSON Wire Protocol Spec](https://github.com/SeleniumHQ/mobile-spec/blob/master/spec-draft.md)
|
|
13
|
-
* USB support for devices is implemented via [appium-ios-
|
|
13
|
+
* USB support for devices is implemented via the [appium-ios-remotexpc](https://github.com/appium/appium-ios/tree/main/packages/remotexpc) library and has zero dependencies on third-party tools.
|
|
14
14
|
* Easy development cycle as it can be launched & debugged directly via Xcode
|
|
15
15
|
* Use [Mac2Driver](https://github.com/appium/appium-mac2-driver) to automate macOS apps
|
|
16
16
|
|
|
@@ -87,6 +87,7 @@
|
|
|
87
87
|
18F6B2130FD815A1B20F05CF /* FBScreenRecordingRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 71BB58E72B96328700CB9BFE /* FBScreenRecordingRequest.m */; };
|
|
88
88
|
18FDF2A8A86ED3286CD819DF /* XCUIPlatformApplicationServicesProviding-Protocol.h in Headers */ = {isa = PBXBuildFile; fileRef = 3BA71BCF1FDA482419CA8596 /* XCUIPlatformApplicationServicesProviding-Protocol.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
|
89
89
|
192CACF49EC3825BA6D2EF4F /* XCTestPrivateSymbols.m in Sources */ = {isa = PBXBuildFile; fileRef = EE6B64FC1D0F86EF00E85F5D /* XCTestPrivateSymbols.m */; };
|
|
90
|
+
193C31F37F354FF490DC9A85 /* FBHIDOperations.m in Sources */ = {isa = PBXBuildFile; fileRef = 3975477AB6C14ABDBBDE3EAD /* FBHIDOperations.m */; };
|
|
90
91
|
1A1EA47F655C5EC77B5DC1DF /* XCTScreenCapturePolicy.h in Headers */ = {isa = PBXBuildFile; fileRef = FDB15E393EA0850C004D26B2 /* XCTScreenCapturePolicy.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
|
91
92
|
1AECD74FEBA8DA2054D5424F /* XCUISystem.h in Headers */ = {isa = PBXBuildFile; fileRef = DE39D4384E531299FAA143F7 /* XCUISystem.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
|
92
93
|
1B24CED62C3F5750008E7F5B /* MySwiftFramework.h in Headers */ = {isa = PBXBuildFile; fileRef = 1B24CED52C3F5750008E7F5B /* MySwiftFramework.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
|
@@ -970,6 +971,7 @@
|
|
|
970
971
|
914D7116A5BF672ACC7F1CE6 /* XCUIInterruptionMonitoring-Protocol.h in Headers */ = {isa = PBXBuildFile; fileRef = 44019CB45CF491B5FDAB8213 /* XCUIInterruptionMonitoring-Protocol.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
|
971
972
|
918A48693FF49E932FDFE3AE /* FBElementHelpers.h in Headers */ = {isa = PBXBuildFile; fileRef = 715A84CD2DD92AD3007134CC /* FBElementHelpers.h */; };
|
|
972
973
|
923B2C779F413A9EB7023AC5 /* XCUIElement+FBVisibleFrame.m in Sources */ = {isa = PBXBuildFile; fileRef = 71AE3CF62D38EE8E0039FC36 /* XCUIElement+FBVisibleFrame.m */; };
|
|
974
|
+
9279EE2CB3EA412A8850B615 /* FBHIDOperations.m in Sources */ = {isa = PBXBuildFile; fileRef = 3975477AB6C14ABDBBDE3EAD /* FBHIDOperations.m */; };
|
|
973
975
|
92A632860C8133ADDD5DE5F4 /* LRUCacheNode.h in Headers */ = {isa = PBXBuildFile; fileRef = 71414ED12670A1ED003A8C5D /* LRUCacheNode.h */; };
|
|
974
976
|
92DC81D2F6E58386AC592482 /* FBXCTestDaemonsProxy.m in Sources */ = {isa = PBXBuildFile; fileRef = EE35AD7A1E3B80C000A02D78 /* FBXCTestDaemonsProxy.m */; };
|
|
975
977
|
932D338E506BD3EDDABBDEA9 /* XCTNSPredicateExpectationObject-Protocol.h in Headers */ = {isa = PBXBuildFile; fileRef = EE35ACEC1E3B77D600A02D78 /* XCTNSPredicateExpectationObject-Protocol.h */; };
|
|
@@ -987,6 +989,7 @@
|
|
|
987
989
|
9709D6A72EB272D0EB6AD51B /* XCTReportingSession.h in Headers */ = {isa = PBXBuildFile; fileRef = CB69A2606052D5979C5A436F /* XCTReportingSession.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
|
988
990
|
97A4C24037304C59C4466337 /* FBXCDeviceEvent.m in Sources */ = {isa = PBXBuildFile; fileRef = 13DE7A48287C4005003243C6 /* FBXCDeviceEvent.m */; };
|
|
989
991
|
97AB752A8043A962100DB4EB /* FBElementCache.h in Headers */ = {isa = PBXBuildFile; fileRef = EE9AB77B1CAEDF0C008C271F /* FBElementCache.h */; };
|
|
992
|
+
97DFB93D8EDD45E9BC475564 /* FBHIDOperations.h in Headers */ = {isa = PBXBuildFile; fileRef = AF9468F16B934D6DB950E4BF /* FBHIDOperations.h */; };
|
|
990
993
|
980947E62D1AC9C4588F21C1 /* XCUIApplication+FBHelpers.m in Sources */ = {isa = PBXBuildFile; fileRef = AD6C269B1CF2494200F8B5FF /* XCUIApplication+FBHelpers.m */; };
|
|
991
994
|
980DFA4D113229070611E023 /* XCTMessagingChannel_IDEToRunner-Protocol.h in Headers */ = {isa = PBXBuildFile; fileRef = 3B3F8E1F3F489A3A94A61ADB /* XCTMessagingChannel_IDEToRunner-Protocol.h */; };
|
|
992
995
|
983096F88976030E95E13362 /* XCTWaiterManager-Protocol.h in Headers */ = {isa = PBXBuildFile; fileRef = CC227321769E70CDF7C2D38F /* XCTWaiterManager-Protocol.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
|
@@ -1037,6 +1040,7 @@
|
|
|
1037
1040
|
A7F0DE38C7CB24D31857C7AE /* XCTSourceCodeContext.h in Headers */ = {isa = PBXBuildFile; fileRef = 530D925D1492C4DF826B46BB /* XCTSourceCodeContext.h */; };
|
|
1038
1041
|
A893F1BC22A6066353FCD515 /* XCUIApplicationProcess+FBQuiescence.m in Sources */ = {isa = PBXBuildFile; fileRef = 71D475C12538F5A8008D9401 /* XCUIApplicationProcess+FBQuiescence.m */; };
|
|
1039
1042
|
A8CEAEFC8CC63F94DA0176A9 /* XCUIDevice+FBVoiceOver.h in Headers */ = {isa = PBXBuildFile; fileRef = A1B2C3D41F001A00A1B0001 /* XCUIDevice+FBVoiceOver.h */; };
|
|
1043
|
+
A8FC9D445C9947988C80AFC9 /* FBHIDOperations.m in Sources */ = {isa = PBXBuildFile; fileRef = 3975477AB6C14ABDBBDE3EAD /* FBHIDOperations.m */; };
|
|
1040
1044
|
A95AE6DC8C54B7E2C3CB2570 /* XCTMessagingRole_SelfDiagnosisIssueReporting-Protocol.h in Headers */ = {isa = PBXBuildFile; fileRef = 74AA57E9A81B1B0515CB587F /* XCTMessagingRole_SelfDiagnosisIssueReporting-Protocol.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
|
1041
1045
|
A967F44C38E10C0295AD08FF /* XCTMessagingRole_CapabilityExchange-Protocol.h in Headers */ = {isa = PBXBuildFile; fileRef = 62A682C55077710D1D90ABC3 /* XCTMessagingRole_CapabilityExchange-Protocol.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
|
1042
1046
|
A970B1FBC690CBE536636228 /* WebDriverAgentLib_watchOS.framework in Copy frameworks */ = {isa = PBXBuildFile; fileRef = D1171249FE5D91AC5D797E5C /* WebDriverAgentLib_watchOS.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
|
|
@@ -1086,6 +1090,7 @@
|
|
|
1086
1090
|
BC91E1DAF79A56CFC4A77D6E /* XCTReportingSessionTestReporter.h in Headers */ = {isa = PBXBuildFile; fileRef = 2D6B33F48F089C945641DB3F /* XCTReportingSessionTestReporter.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
|
1087
1091
|
BCC63D234BBBA7F8BF8E953D /* XCTRepetitionPolicy.h in Headers */ = {isa = PBXBuildFile; fileRef = A1291FF806FE75EDE239FE44 /* XCTRepetitionPolicy.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
|
1088
1092
|
BD2A5D43881B449E533D5800 /* UIKeyboardImpl.h in Headers */ = {isa = PBXBuildFile; fileRef = 648C10AA22AAAD9C00B81B9A /* UIKeyboardImpl.h */; };
|
|
1093
|
+
BD3FD3FCF7D74D3DAC313415 /* FBHIDOperations.h in Headers */ = {isa = PBXBuildFile; fileRef = AF9468F16B934D6DB950E4BF /* FBHIDOperations.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
|
1089
1094
|
BD8002B8812AF2CDD76BDF4D /* FBImageUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = 7150348621A6DAD600A0F4BA /* FBImageUtils.m */; };
|
|
1090
1095
|
BE63FC311D9DD0A98874568B /* XCUIApplicationManaging-Protocol.h in Headers */ = {isa = PBXBuildFile; fileRef = 00834B3220005AD5A5ABEF7C /* XCUIApplicationManaging-Protocol.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
|
1091
1096
|
BEA2BBF8D2DB363E141B3BD3 /* XCUIIssueDiagnosticsProviding-Protocol.h in Headers */ = {isa = PBXBuildFile; fileRef = 55B3452AB887CADB7AD757A4 /* XCUIIssueDiagnosticsProviding-Protocol.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
|
@@ -1228,6 +1233,7 @@
|
|
|
1228
1233
|
EA230F78EA120ADDB665D4A1 /* XCTCapabilitiesProviding-Protocol.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B069904A4086E12556F1FAB /* XCTCapabilitiesProviding-Protocol.h */; };
|
|
1229
1234
|
EAAF5A671C1E9FF099797CDB /* XCUIDevice+FBRotation.m in Sources */ = {isa = PBXBuildFile; fileRef = EEE3763E1D59F81400ED88DD /* XCUIDevice+FBRotation.m */; };
|
|
1230
1235
|
EAC0099EAC9722C516860CB3 /* FBTouchActionCommands.m in Sources */ = {isa = PBXBuildFile; fileRef = 71241D7A1FAE3D2500B9559F /* FBTouchActionCommands.m */; };
|
|
1236
|
+
EB4835874F7A441B92844DDC /* FBHIDOperations.h in Headers */ = {isa = PBXBuildFile; fileRef = AF9468F16B934D6DB950E4BF /* FBHIDOperations.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
|
1231
1237
|
ECC4ABB5477FBA3D442559B1 /* AppDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 242FCA9DD0E30D748E0A1969 /* AppDelegate.h */; };
|
|
1232
1238
|
ED055540E72DDD419F88EEA4 /* XCUIApplicationProcessDelay.m in Sources */ = {isa = PBXBuildFile; fileRef = 6385F4A5220A40760095BBDB /* XCUIApplicationProcessDelay.m */; };
|
|
1233
1239
|
ED342D194B20A206864675B2 /* XCUIApplication+FBUIInterruptions.h in Headers */ = {isa = PBXBuildFile; fileRef = 716C9DFE27315EFF005AD475 /* XCUIApplication+FBUIInterruptions.h */; };
|
|
@@ -1567,6 +1573,7 @@
|
|
|
1567
1573
|
383EDCC8A7DB02466080DD07 /* Testing.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Testing.framework; path = Developer/Library/Frameworks/Testing.framework; sourceTree = PLATFORM_DIR; };
|
|
1568
1574
|
38A71CF17E35B81EA28BB7A5 /* AxeProductDeclaration.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AxeProductDeclaration.m; sourceTree = "<group>"; };
|
|
1569
1575
|
38E3FC945B8BF6F6AFD73EE7 /* XCTElementSnapshotAttributeDataSource-Protocol.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "XCTElementSnapshotAttributeDataSource-Protocol.h"; sourceTree = "<group>"; };
|
|
1576
|
+
3975477AB6C14ABDBBDE3EAD /* FBHIDOperations.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FBHIDOperations.m; sourceTree = "<group>"; };
|
|
1570
1577
|
3A53731B41356D9B4E723A4D /* FBTVFocusIntegrationTests.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = FBTVFocusIntegrationTests.m; sourceTree = "<group>"; };
|
|
1571
1578
|
3B3F8E1F3F489A3A94A61ADB /* XCTMessagingChannel_IDEToRunner-Protocol.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "XCTMessagingChannel_IDEToRunner-Protocol.h"; sourceTree = "<group>"; };
|
|
1572
1579
|
3BA71BCF1FDA482419CA8596 /* XCUIPlatformApplicationServicesProviding-Protocol.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "XCUIPlatformApplicationServicesProviding-Protocol.h"; sourceTree = "<group>"; };
|
|
@@ -1843,6 +1850,7 @@
|
|
|
1843
1850
|
ADDA07231D6BB2BF001700AC /* FBScrollViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FBScrollViewController.m; sourceTree = "<group>"; };
|
|
1844
1851
|
ADEF63AE1D09DEBE0070A7E3 /* FBRuntimeUtilsTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FBRuntimeUtilsTests.m; sourceTree = "<group>"; };
|
|
1845
1852
|
AF208CBAC82CDFF8B6F88867 /* XCUIElementTypeQueryProvider_Private-Protocol.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "XCUIElementTypeQueryProvider_Private-Protocol.h"; sourceTree = "<group>"; };
|
|
1853
|
+
AF9468F16B934D6DB950E4BF /* FBHIDOperations.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FBHIDOperations.h; sourceTree = "<group>"; };
|
|
1846
1854
|
AFD7929A5F0B45397F0D64CB /* XCTMemoryChecker.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = XCTMemoryChecker.h; sourceTree = "<group>"; };
|
|
1847
1855
|
B316351B2DDF0CF5007D9317 /* FBAccessibilityTraits.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = FBAccessibilityTraits.m; sourceTree = "<group>"; };
|
|
1848
1856
|
B316351E2DDF0D0B007D9317 /* FBAccessibilityTraits.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FBAccessibilityTraits.h; sourceTree = "<group>"; };
|
|
@@ -2687,7 +2695,6 @@
|
|
|
2687
2695
|
isa = PBXGroup;
|
|
2688
2696
|
children = (
|
|
2689
2697
|
71414ECF2670A1ED003A8C5D /* LRUCache */,
|
|
2690
|
-
|
|
2691
2698
|
13815F6D2328D20400CDAB61 /* FBActiveAppDetectionPoint.h */,
|
|
2692
2699
|
13815F6E2328D20400CDAB61 /* FBActiveAppDetectionPoint.m */,
|
|
2693
2700
|
719CD8F62126C78F00C7D0C2 /* FBAlertsMonitor.h */,
|
|
@@ -2718,7 +2725,9 @@
|
|
|
2718
2725
|
EE9B76A41CF7A43900275851 /* FBLogger.m */,
|
|
2719
2726
|
EE9B76A51CF7A43900275851 /* FBMacros.h */,
|
|
2720
2727
|
EE1888381DA661C400307AA8 /* FBMathUtils.h */,
|
|
2728
|
+
AF9468F16B934D6DB950E4BF /* FBHIDOperations.h */,
|
|
2721
2729
|
EE1888391DA661C400307AA8 /* FBMathUtils.m */,
|
|
2730
|
+
3975477AB6C14ABDBBDE3EAD /* FBHIDOperations.m */,
|
|
2722
2731
|
7155D701211DCEF400166C20 /* FBMjpegServer.h */,
|
|
2723
2732
|
7155D702211DCEF400166C20 /* FBMjpegServer.m */,
|
|
2724
2733
|
719DCF132601EAFB000E765F /* FBNotificationsHelper.h */,
|
|
@@ -3436,6 +3445,7 @@
|
|
|
3436
3445
|
CA077D3ED0D0BA2590CB85DE /* RouteRequest.h in Headers */,
|
|
3437
3446
|
44A6F8DBFDCDD735D000458D /* RouteResponse.h in Headers */,
|
|
3438
3447
|
210AB789D14D40308B764DD0 /* XCUIDevice+FBHinge.h in Headers */,
|
|
3448
|
+
BD3FD3FCF7D74D3DAC313415 /* FBHIDOperations.h in Headers */,
|
|
3439
3449
|
);
|
|
3440
3450
|
runOnlyForDeploymentPostprocessing = 0;
|
|
3441
3451
|
};
|
|
@@ -3506,6 +3516,7 @@
|
|
|
3506
3516
|
641EE66E2240C5CA00173FCB /* XCUIApplication+FBAlert.h in Headers */,
|
|
3507
3517
|
716C9E0127315EFF005AD475 /* XCUIApplication+FBUIInterruptions.h in Headers */,
|
|
3508
3518
|
641EE6702240C5CA00173FCB /* FBMathUtils.h in Headers */,
|
|
3519
|
+
EB4835874F7A441B92844DDC /* FBHIDOperations.h in Headers */,
|
|
3509
3520
|
641EE6722240C5CA00173FCB /* FBElementUtils.h in Headers */,
|
|
3510
3521
|
641EE6732240C5CA00173FCB /* FBDebugCommands.h in Headers */,
|
|
3511
3522
|
641EE6752240C5CA00173FCB /* XCUICoordinate.h in Headers */,
|
|
@@ -3822,6 +3833,7 @@
|
|
|
3822
3833
|
95A597B8CC694006DDE49999 /* XCUIApplication+FBAlert.h in Headers */,
|
|
3823
3834
|
ED342D194B20A206864675B2 /* XCUIApplication+FBUIInterruptions.h in Headers */,
|
|
3824
3835
|
E6B214145FE46BBFD824FAE7 /* FBMathUtils.h in Headers */,
|
|
3836
|
+
97DFB93D8EDD45E9BC475564 /* FBHIDOperations.h in Headers */,
|
|
3825
3837
|
6786D4B257269918E591AC66 /* FBElementUtils.h in Headers */,
|
|
3826
3838
|
51FFE79AF3A5FADFFAB287BC /* FBDebugCommands.h in Headers */,
|
|
3827
3839
|
6D311C0CB39981D7211B5576 /* XCUICoordinate.h in Headers */,
|
|
@@ -4755,6 +4767,7 @@
|
|
|
4755
4767
|
7072174F17BA109C6AB2859F /* RouteRequest.m in Sources */,
|
|
4756
4768
|
5B9C00B488A31A95F1460727 /* RouteResponse.m in Sources */,
|
|
4757
4769
|
25C9BDFC65564D78A70231B4 /* XCUIDevice+FBHinge.m in Sources */,
|
|
4770
|
+
9279EE2CB3EA412A8850B615 /* FBHIDOperations.m in Sources */,
|
|
4758
4771
|
);
|
|
4759
4772
|
runOnlyForDeploymentPostprocessing = 0;
|
|
4760
4773
|
};
|
|
@@ -4880,6 +4893,7 @@
|
|
|
4880
4893
|
641EE6242240C5CA00173FCB /* FBXCTestDaemonsProxy.m in Sources */,
|
|
4881
4894
|
13DE7A58287CA1EC003243C6 /* FBXCElementSnapshotWrapper.m in Sources */,
|
|
4882
4895
|
641EE6262240C5CA00173FCB /* FBMathUtils.m in Sources */,
|
|
4896
|
+
A8FC9D445C9947988C80AFC9 /* FBHIDOperations.m in Sources */,
|
|
4883
4897
|
641EE6272240C5CA00173FCB /* FBXCAXClientProxy.m in Sources */,
|
|
4884
4898
|
43DE58587952717F4DEE228E /* FBHTTPServer.m in Sources */,
|
|
4885
4899
|
667705A8195BF7B0D48180B3 /* RouteRequest.m in Sources */,
|
|
@@ -5040,6 +5054,7 @@
|
|
|
5040
5054
|
92DC81D2F6E58386AC592482 /* FBXCTestDaemonsProxy.m in Sources */,
|
|
5041
5055
|
4819BEAC415E02570C0FA074 /* FBXCElementSnapshotWrapper.m in Sources */,
|
|
5042
5056
|
C4E500AC8CD81B4FE3A75EAE /* FBMathUtils.m in Sources */,
|
|
5057
|
+
193C31F37F354FF490DC9A85 /* FBHIDOperations.m in Sources */,
|
|
5043
5058
|
D062CA5914608761FE002799 /* FBXCAXClientProxy.m in Sources */,
|
|
5044
5059
|
46C54343FB83AD3AFC6CFCD4 /* FBTCPSocket.m in Sources */,
|
|
5045
5060
|
AA11BB22CC33DD44EE55FF02 /* FBMjpegServer.m in Sources */,
|
|
@@ -5716,6 +5731,17 @@
|
|
|
5716
5731
|
isa = XCBuildConfiguration;
|
|
5717
5732
|
baseConfigurationReference = EEE5CABF1C80361500CBBDD9 /* IOSSettings.xcconfig */;
|
|
5718
5733
|
buildSettings = {
|
|
5734
|
+
"EXCLUDED_SOURCE_FILE_NAMES[sdk=iphonesimulator*]" = "$(inherited) $(WDA_XCTEST_EXCLUDED_$(XCODE_VERSION_MAJOR)) $(WDA_XCTEST_EXCLUDED_MINOR_$(XCODE_VERSION_MINOR))";
|
|
5735
|
+
"EXCLUDED_SOURCE_FILE_NAMES[sdk=iphoneos*]" = "$(inherited) $(WDA_XCTEST_EXCLUDED_1600)";
|
|
5736
|
+
/* Reuse Xcode 26 framework embedding; add only its missing dependencies. */
|
|
5737
|
+
WDA_XCTEST_EXCLUDED_2600 = "XCTest.framework XCTestCore.framework XCUIAutomation.framework XCTAutomationSupport.framework Testing.framework ResultDataPublisher.framework XCTestSupport.framework libXCTestSwiftSupport.dylib";
|
|
5738
|
+
/* Xcode 16 does not need the additional Swift Testing dependencies. */
|
|
5739
|
+
WDA_XCTEST_EXCLUDED_1600 = "$(WDA_XCTEST_EXCLUDED_2600) lib_TestingInterop.dylib _Testing_Foundation.framework";
|
|
5740
|
+
/* Xcode 26.0-26.3 do not ship lib_TestingInterop.dylib, so there is nothing to embed. */
|
|
5741
|
+
WDA_XCTEST_EXCLUDED_MINOR_2600 = lib_TestingInterop.dylib;
|
|
5742
|
+
WDA_XCTEST_EXCLUDED_MINOR_2610 = lib_TestingInterop.dylib;
|
|
5743
|
+
WDA_XCTEST_EXCLUDED_MINOR_2620 = lib_TestingInterop.dylib;
|
|
5744
|
+
WDA_XCTEST_EXCLUDED_MINOR_2630 = lib_TestingInterop.dylib;
|
|
5719
5745
|
CLANG_STATIC_ANALYZER_MODE = deep;
|
|
5720
5746
|
ENABLE_TESTING_SEARCH_PATHS = YES;
|
|
5721
5747
|
FRAMEWORK_SEARCH_PATHS = "$(inherited)";
|
|
@@ -6704,6 +6730,17 @@
|
|
|
6704
6730
|
isa = XCBuildConfiguration;
|
|
6705
6731
|
baseConfigurationReference = EEE5CABF1C80361500CBBDD9 /* IOSSettings.xcconfig */;
|
|
6706
6732
|
buildSettings = {
|
|
6733
|
+
"EXCLUDED_SOURCE_FILE_NAMES[sdk=iphonesimulator*]" = "$(inherited) $(WDA_XCTEST_EXCLUDED_$(XCODE_VERSION_MAJOR)) $(WDA_XCTEST_EXCLUDED_MINOR_$(XCODE_VERSION_MINOR))";
|
|
6734
|
+
"EXCLUDED_SOURCE_FILE_NAMES[sdk=iphoneos*]" = "$(inherited) $(WDA_XCTEST_EXCLUDED_1600)";
|
|
6735
|
+
/* Reuse Xcode 26 framework embedding; add only its missing dependencies. */
|
|
6736
|
+
WDA_XCTEST_EXCLUDED_2600 = "XCTest.framework XCTestCore.framework XCUIAutomation.framework XCTAutomationSupport.framework Testing.framework ResultDataPublisher.framework XCTestSupport.framework libXCTestSwiftSupport.dylib";
|
|
6737
|
+
/* Xcode 16 does not need the additional Swift Testing dependencies. */
|
|
6738
|
+
WDA_XCTEST_EXCLUDED_1600 = "$(WDA_XCTEST_EXCLUDED_2600) lib_TestingInterop.dylib _Testing_Foundation.framework";
|
|
6739
|
+
/* Xcode 26.0-26.3 do not ship lib_TestingInterop.dylib, so there is nothing to embed. */
|
|
6740
|
+
WDA_XCTEST_EXCLUDED_MINOR_2600 = lib_TestingInterop.dylib;
|
|
6741
|
+
WDA_XCTEST_EXCLUDED_MINOR_2610 = lib_TestingInterop.dylib;
|
|
6742
|
+
WDA_XCTEST_EXCLUDED_MINOR_2620 = lib_TestingInterop.dylib;
|
|
6743
|
+
WDA_XCTEST_EXCLUDED_MINOR_2630 = lib_TestingInterop.dylib;
|
|
6707
6744
|
CLANG_STATIC_ANALYZER_MODE = deep;
|
|
6708
6745
|
DEBUG_INFORMATION_FORMAT = dwarf;
|
|
6709
6746
|
ENABLE_TESTING_SEARCH_PATHS = YES;
|
|
@@ -7256,6 +7293,17 @@
|
|
|
7256
7293
|
isa = XCBuildConfiguration;
|
|
7257
7294
|
baseConfigurationReference = EEE5CABF1C80361500CBBDD9 /* IOSSettings.xcconfig */;
|
|
7258
7295
|
buildSettings = {
|
|
7296
|
+
"EXCLUDED_SOURCE_FILE_NAMES[sdk=iphonesimulator*]" = "$(inherited) $(WDA_XCTEST_EXCLUDED_$(XCODE_VERSION_MAJOR)) $(WDA_XCTEST_EXCLUDED_MINOR_$(XCODE_VERSION_MINOR))";
|
|
7297
|
+
"EXCLUDED_SOURCE_FILE_NAMES[sdk=iphoneos*]" = "$(inherited) $(WDA_XCTEST_EXCLUDED_1600)";
|
|
7298
|
+
/* Reuse Xcode 26 framework embedding; add only its missing dependencies. */
|
|
7299
|
+
WDA_XCTEST_EXCLUDED_2600 = "XCTest.framework XCTestCore.framework XCUIAutomation.framework XCTAutomationSupport.framework Testing.framework ResultDataPublisher.framework XCTestSupport.framework libXCTestSwiftSupport.dylib";
|
|
7300
|
+
/* Xcode 16 does not need the additional Swift Testing dependencies. */
|
|
7301
|
+
WDA_XCTEST_EXCLUDED_1600 = "$(WDA_XCTEST_EXCLUDED_2600) lib_TestingInterop.dylib _Testing_Foundation.framework";
|
|
7302
|
+
/* Xcode 26.0-26.3 do not ship lib_TestingInterop.dylib, so there is nothing to embed. */
|
|
7303
|
+
WDA_XCTEST_EXCLUDED_MINOR_2600 = lib_TestingInterop.dylib;
|
|
7304
|
+
WDA_XCTEST_EXCLUDED_MINOR_2610 = lib_TestingInterop.dylib;
|
|
7305
|
+
WDA_XCTEST_EXCLUDED_MINOR_2620 = lib_TestingInterop.dylib;
|
|
7306
|
+
WDA_XCTEST_EXCLUDED_MINOR_2630 = lib_TestingInterop.dylib;
|
|
7259
7307
|
CLANG_STATIC_ANALYZER_MODE = deep;
|
|
7260
7308
|
ENABLE_TESTING_SEARCH_PATHS = YES;
|
|
7261
7309
|
FRAMEWORK_SEARCH_PATHS = "$(inherited)";
|
|
@@ -8134,12 +8182,17 @@
|
|
|
8134
8182
|
isa = XCBuildConfiguration;
|
|
8135
8183
|
baseConfigurationReference = EEE5CABF1C80361500CBBDD9 /* IOSSettings.xcconfig */;
|
|
8136
8184
|
buildSettings = {
|
|
8137
|
-
"EXCLUDED_SOURCE_FILE_NAMES[sdk=iphonesimulator*]" = "$(inherited) $(WDA_XCTEST_EXCLUDED_$(XCODE_VERSION_MAJOR))";
|
|
8185
|
+
"EXCLUDED_SOURCE_FILE_NAMES[sdk=iphonesimulator*]" = "$(inherited) $(WDA_XCTEST_EXCLUDED_$(XCODE_VERSION_MAJOR)) $(WDA_XCTEST_EXCLUDED_MINOR_$(XCODE_VERSION_MINOR))";
|
|
8138
8186
|
"EXCLUDED_SOURCE_FILE_NAMES[sdk=iphoneos*]" = "$(inherited) $(WDA_XCTEST_EXCLUDED_1600)";
|
|
8139
8187
|
/* Reuse Xcode 26 framework embedding; add only its missing dependencies. */
|
|
8140
8188
|
WDA_XCTEST_EXCLUDED_2600 = "XCTest.framework XCTestCore.framework XCUIAutomation.framework XCTAutomationSupport.framework Testing.framework ResultDataPublisher.framework XCTestSupport.framework libXCTestSwiftSupport.dylib";
|
|
8141
8189
|
/* Xcode 16 does not need the additional Swift Testing dependencies. */
|
|
8142
8190
|
WDA_XCTEST_EXCLUDED_1600 = "$(WDA_XCTEST_EXCLUDED_2600) lib_TestingInterop.dylib _Testing_Foundation.framework";
|
|
8191
|
+
/* Xcode 26.0-26.3 do not ship lib_TestingInterop.dylib, so there is nothing to embed. */
|
|
8192
|
+
WDA_XCTEST_EXCLUDED_MINOR_2600 = lib_TestingInterop.dylib;
|
|
8193
|
+
WDA_XCTEST_EXCLUDED_MINOR_2610 = lib_TestingInterop.dylib;
|
|
8194
|
+
WDA_XCTEST_EXCLUDED_MINOR_2620 = lib_TestingInterop.dylib;
|
|
8195
|
+
WDA_XCTEST_EXCLUDED_MINOR_2630 = lib_TestingInterop.dylib;
|
|
8143
8196
|
|
|
8144
8197
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
|
8145
8198
|
CLANG_STATIC_ANALYZER_MODE = deep;
|
|
@@ -8199,12 +8252,17 @@
|
|
|
8199
8252
|
isa = XCBuildConfiguration;
|
|
8200
8253
|
baseConfigurationReference = EEE5CABF1C80361500CBBDD9 /* IOSSettings.xcconfig */;
|
|
8201
8254
|
buildSettings = {
|
|
8202
|
-
"EXCLUDED_SOURCE_FILE_NAMES[sdk=iphonesimulator*]" = "$(inherited) $(WDA_XCTEST_EXCLUDED_$(XCODE_VERSION_MAJOR))";
|
|
8255
|
+
"EXCLUDED_SOURCE_FILE_NAMES[sdk=iphonesimulator*]" = "$(inherited) $(WDA_XCTEST_EXCLUDED_$(XCODE_VERSION_MAJOR)) $(WDA_XCTEST_EXCLUDED_MINOR_$(XCODE_VERSION_MINOR))";
|
|
8203
8256
|
"EXCLUDED_SOURCE_FILE_NAMES[sdk=iphoneos*]" = "$(inherited) $(WDA_XCTEST_EXCLUDED_1600)";
|
|
8204
8257
|
/* Reuse Xcode 26 framework embedding; add only its missing dependencies. */
|
|
8205
8258
|
WDA_XCTEST_EXCLUDED_2600 = "XCTest.framework XCTestCore.framework XCUIAutomation.framework XCTAutomationSupport.framework Testing.framework ResultDataPublisher.framework XCTestSupport.framework libXCTestSwiftSupport.dylib";
|
|
8206
8259
|
/* Xcode 16 does not need the additional Swift Testing dependencies. */
|
|
8207
8260
|
WDA_XCTEST_EXCLUDED_1600 = "$(WDA_XCTEST_EXCLUDED_2600) lib_TestingInterop.dylib _Testing_Foundation.framework";
|
|
8261
|
+
/* Xcode 26.0-26.3 do not ship lib_TestingInterop.dylib, so there is nothing to embed. */
|
|
8262
|
+
WDA_XCTEST_EXCLUDED_MINOR_2600 = lib_TestingInterop.dylib;
|
|
8263
|
+
WDA_XCTEST_EXCLUDED_MINOR_2610 = lib_TestingInterop.dylib;
|
|
8264
|
+
WDA_XCTEST_EXCLUDED_MINOR_2620 = lib_TestingInterop.dylib;
|
|
8265
|
+
WDA_XCTEST_EXCLUDED_MINOR_2630 = lib_TestingInterop.dylib;
|
|
8208
8266
|
|
|
8209
8267
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
|
8210
8268
|
CLANG_STATIC_ANALYZER_MODE = deep;
|
|
@@ -18,6 +18,9 @@ NS_ASSUME_NONNULL_BEGIN
|
|
|
18
18
|
|
|
19
19
|
@interface XCUIApplication (FBHelpers)
|
|
20
20
|
|
|
21
|
+
/** Activates the application and waits for the system transition when resuming on iOS. */
|
|
22
|
+
- (void)fb_activate;
|
|
23
|
+
|
|
21
24
|
/**
|
|
22
25
|
Deactivates application for given time
|
|
23
26
|
|
|
@@ -33,7 +36,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|
|
33
36
|
- (NSDictionary *)fb_tree;
|
|
34
37
|
|
|
35
38
|
/**
|
|
36
|
-
@param excludedAttributes Set of possible attributes to be excluded i.e frame, enabled, visible, accessible, focused. If set to nil or an empty array then no attributes will be excluded from the resulting JSON
|
|
39
|
+
@param excludedAttributes Set of possible attributes to be excluded i.e frame, nativeFrame, enabled, visible, accessible, nativeAccessibilityElement, focused, traits, placeholderValue, minValue, maxValue, customActions. If set to nil or an empty array then no attributes will be excluded from the resulting JSON
|
|
37
40
|
@return application elements tree in form of nested dictionaries
|
|
38
41
|
*/
|
|
39
42
|
- (NSDictionary *)fb_tree:(nullable NSSet<NSString *> *) excludedAttributes;
|
|
@@ -52,6 +52,7 @@ static NSString* const FBExclusionAttributeNativeFrame = @"nativeFrame";
|
|
|
52
52
|
static NSString* const FBExclusionAttributeTraits = @"traits";
|
|
53
53
|
static NSString* const FBExclusionAttributeMinValue = @"minValue";
|
|
54
54
|
static NSString* const FBExclusionAttributeMaxValue = @"maxValue";
|
|
55
|
+
static NSString* const FBExclusionAttributeCustomActions = @"customActions";
|
|
55
56
|
|
|
56
57
|
static NSString *FBJsonPrefixedAttributeKey(NSString *key)
|
|
57
58
|
{
|
|
@@ -120,6 +121,10 @@ NSDictionary<NSString *, NSString *> *customExclusionAttributesMap(void) {
|
|
|
120
121
|
return result;
|
|
121
122
|
}
|
|
122
123
|
|
|
124
|
+
@interface XCUIApplication (FBActivationPrivate)
|
|
125
|
+
- (void)fb_activateWaitingForSystemTransition:(BOOL)shouldWait;
|
|
126
|
+
@end
|
|
127
|
+
|
|
123
128
|
@implementation XCUIApplication (FBHelpers)
|
|
124
129
|
|
|
125
130
|
- (BOOL)fb_waitForAppElement:(NSTimeInterval)timeout
|
|
@@ -172,13 +177,38 @@ NSDictionary<NSString *, NSString *> *customExclusionAttributesMap(void) {
|
|
|
172
177
|
return [self fb_appsInfoWithAxElements:[FBXCAXClientProxy.sharedClient activeApplications]];
|
|
173
178
|
}
|
|
174
179
|
|
|
180
|
+
- (void)fb_activate
|
|
181
|
+
{
|
|
182
|
+
BOOL shouldWaitForSystemTransition = NO;
|
|
183
|
+
#if !TARGET_OS_TV && !TARGET_OS_WATCH
|
|
184
|
+
XCUIApplicationState previousState = self.state;
|
|
185
|
+
shouldWaitForSystemTransition = previousState == XCUIApplicationStateRunningBackground
|
|
186
|
+
|| previousState == XCUIApplicationStateRunningBackgroundSuspended;
|
|
187
|
+
#endif
|
|
188
|
+
[self fb_activateWaitingForSystemTransition:shouldWaitForSystemTransition];
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
- (void)fb_activateWaitingForSystemTransition:(BOOL)shouldWait
|
|
192
|
+
{
|
|
193
|
+
[self activate];
|
|
194
|
+
#if !TARGET_OS_TV && !TARGET_OS_WATCH
|
|
195
|
+
if (shouldWait) {
|
|
196
|
+
// App quiescence alone can miss the system resume transition.
|
|
197
|
+
// https://github.com/appium/appium/issues/22857
|
|
198
|
+
[XCUIApplication.fb_systemApplication fb_waitUntilStableWithTimeout:
|
|
199
|
+
FBConfiguration.sharedInstance.animationCoolOffTimeout];
|
|
200
|
+
}
|
|
201
|
+
#endif
|
|
202
|
+
}
|
|
203
|
+
|
|
175
204
|
- (BOOL)fb_deactivateWithDuration:(NSTimeInterval)duration error:(NSError **)error
|
|
176
205
|
{
|
|
177
206
|
if(![[XCUIDevice sharedDevice] fb_goToHomescreenWithError:error]) {
|
|
178
207
|
return NO;
|
|
179
208
|
}
|
|
180
209
|
[[NSRunLoop currentRunLoop] runUntilDate:[NSDate dateWithTimeIntervalSinceNow:MAX(duration, .0)]];
|
|
181
|
-
|
|
210
|
+
// A zero-duration background transition may still report the app as foreground.
|
|
211
|
+
[self fb_activateWaitingForSystemTransition:YES];
|
|
182
212
|
return YES;
|
|
183
213
|
}
|
|
184
214
|
|
|
@@ -213,7 +243,6 @@ NSDictionary<NSString *, NSString *> *customExclusionAttributesMap(void) {
|
|
|
213
243
|
info[@"value"] = FBValueOrNull(wrappedSnapshot.wdValue);
|
|
214
244
|
info[@"label"] = FBValueOrNull(wrappedSnapshot.wdLabel);
|
|
215
245
|
info[@"rect"] = wrappedSnapshot.wdRect;
|
|
216
|
-
info[@"customActions"] = FBValueOrNull(wrappedSnapshot.wdCustomActions);
|
|
217
246
|
|
|
218
247
|
NSDictionary<NSString *, NSString *(^)(void)> *attributeBlocks = [self fb_attributeBlockMapForWrappedSnapshot:wrappedSnapshot];
|
|
219
248
|
|
|
@@ -224,6 +253,7 @@ NSDictionary<NSString *, NSString *> *customExclusionAttributesMap(void) {
|
|
|
224
253
|
FBExclusionAttributeTraits,
|
|
225
254
|
FBExclusionAttributeMinValue,
|
|
226
255
|
FBExclusionAttributeMaxValue,
|
|
256
|
+
FBExclusionAttributeCustomActions,
|
|
227
257
|
nil];
|
|
228
258
|
|
|
229
259
|
for (NSString *key in attributeBlocks) {
|
|
@@ -286,6 +316,9 @@ NSDictionary<NSString *, NSString *> *customExclusionAttributesMap(void) {
|
|
|
286
316
|
},
|
|
287
317
|
FBExclusionAttributeTraits: ^{
|
|
288
318
|
return wrappedSnapshot.wdTraits;
|
|
319
|
+
},
|
|
320
|
+
FBExclusionAttributeCustomActions: ^{
|
|
321
|
+
return (NSString *)FBValueOrNull(wrappedSnapshot.wdCustomActions);
|
|
289
322
|
}
|
|
290
323
|
} mutableCopy];
|
|
291
324
|
|
|
@@ -233,4 +233,10 @@ typedef NS_ENUM(NSUInteger, FBUIInterfaceAppearance) {
|
|
|
233
233
|
|
|
234
234
|
@end
|
|
235
235
|
|
|
236
|
+
/**
|
|
237
|
+
Returns the map of lowercase button names to their XCTest enum values
|
|
238
|
+
supported on the current platform (cached after the first call).
|
|
239
|
+
*/
|
|
240
|
+
extern NSDictionary<NSString *, NSNumber *> *FBAvailableButtonNames(void);
|
|
241
|
+
|
|
236
242
|
NS_ASSUME_NONNULL_END
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
#include <notify.h>
|
|
14
14
|
#import <objc/runtime.h>
|
|
15
15
|
|
|
16
|
+
#import "FBHIDOperations.h"
|
|
16
17
|
#import "FBErrorBuilder.h"
|
|
17
18
|
#import "FBImageUtils.h"
|
|
18
19
|
#import "FBMacros.h"
|
|
@@ -22,12 +23,17 @@
|
|
|
22
23
|
#import "FBXCodeCompatibility.h"
|
|
23
24
|
#import "FBXCTestDaemonsProxy.h"
|
|
24
25
|
#import "XCUIDevice.h"
|
|
26
|
+
#import "XCUIApplication.h"
|
|
25
27
|
|
|
26
28
|
static const NSTimeInterval FBHomeButtonCoolOffTime = 1.;
|
|
27
29
|
static const NSTimeInterval FBScreenLockTimeout = 5.;
|
|
28
30
|
|
|
31
|
+
#if TARGET_OS_WATCH
|
|
32
|
+
static NSString *const FBClockFaceBundleId = @"com.apple.clockface";
|
|
33
|
+
#endif
|
|
34
|
+
|
|
29
35
|
#if TARGET_OS_TV
|
|
30
|
-
NSDictionary<NSString *, NSNumber *> *
|
|
36
|
+
NSDictionary<NSString *, NSNumber *> *FBAvailableButtonNames(void) {
|
|
31
37
|
static dispatch_once_t onceToken;
|
|
32
38
|
static NSDictionary *result;
|
|
33
39
|
dispatch_once(&onceToken, ^{
|
|
@@ -58,7 +64,7 @@ NSDictionary<NSString *, NSNumber *> *fb_availableButtonNames(void) {
|
|
|
58
64
|
return result;
|
|
59
65
|
}
|
|
60
66
|
#else
|
|
61
|
-
NSDictionary<NSString *, NSNumber *> *
|
|
67
|
+
NSDictionary<NSString *, NSNumber *> *FBAvailableButtonNames(void) {
|
|
62
68
|
static dispatch_once_t onceToken;
|
|
63
69
|
static NSDictionary *result;
|
|
64
70
|
dispatch_once(&onceToken, ^{
|
|
@@ -136,29 +142,90 @@ static bool fb_isLocked;
|
|
|
136
142
|
|
|
137
143
|
- (BOOL)fb_goToHomescreenWithError:(NSError **)error
|
|
138
144
|
{
|
|
145
|
+
#if TARGET_OS_TV
|
|
146
|
+
return [self fb_goToHomescreenOnTVWithError:error];
|
|
147
|
+
#elif TARGET_OS_WATCH
|
|
148
|
+
return [self fb_goToHomescreenOnWatchWithError:error];
|
|
149
|
+
#else
|
|
139
150
|
return [XCUIApplication fb_switchToSystemApplicationWithError:error];
|
|
151
|
+
#endif
|
|
140
152
|
}
|
|
141
153
|
|
|
154
|
+
#if TARGET_OS_WATCH
|
|
155
|
+
- (BOOL)fb_goToHomescreenOnWatchWithError:(NSError **)error
|
|
156
|
+
{
|
|
157
|
+
// Carousel rejects launch/activate requests on watchOS 27.0.
|
|
158
|
+
XCUIApplication *foregroundApp = XCUIApplication.fb_activeApplication;
|
|
159
|
+
// The watch face is a separate foreground application from Carousel.
|
|
160
|
+
if ([foregroundApp.bundleID isEqualToString:FBClockFaceBundleId]
|
|
161
|
+
|| [foregroundApp fb_isSameAppAs:XCUIApplication.fb_systemApplication]) {
|
|
162
|
+
return YES;
|
|
163
|
+
}
|
|
164
|
+
@try {
|
|
165
|
+
[self pressButton:XCUIDeviceButtonHome];
|
|
166
|
+
} @catch (NSException *exception) {
|
|
167
|
+
return [[[FBErrorBuilder alloc] withDescription:exception.reason] buildError:error];
|
|
168
|
+
}
|
|
169
|
+
return [[[[FBRunLoopSpinner new] timeout:5]
|
|
170
|
+
timeoutErrorMessage:@"Timed out while waiting for the home screen"]
|
|
171
|
+
spinUntilTrue:^BOOL{
|
|
172
|
+
return foregroundApp.state != XCUIApplicationStateRunningForeground;
|
|
173
|
+
} error:error];
|
|
174
|
+
}
|
|
175
|
+
#endif
|
|
176
|
+
|
|
177
|
+
#if TARGET_OS_TV
|
|
178
|
+
- (BOOL)fb_goToHomescreenOnTVWithError:(NSError **)error
|
|
179
|
+
{
|
|
180
|
+
// PineBoard rejects launch/activate requests on tvOS 26.5 and 27.0.
|
|
181
|
+
XCUIApplication *foregroundApp = XCUIApplication.fb_activeApplication;
|
|
182
|
+
if ([foregroundApp fb_isSameAppAs:XCUIApplication.fb_systemApplication]) {
|
|
183
|
+
return YES;
|
|
184
|
+
}
|
|
185
|
+
@try {
|
|
186
|
+
[XCUIRemote.sharedRemote pressButton:XCUIRemoteButtonHome];
|
|
187
|
+
} @catch (NSException *exception) {
|
|
188
|
+
return [[[FBErrorBuilder alloc] withDescription:exception.reason] buildError:error];
|
|
189
|
+
}
|
|
190
|
+
return [[[[FBRunLoopSpinner new] timeout:5]
|
|
191
|
+
timeoutErrorMessage:@"Timed out while waiting for the home screen"]
|
|
192
|
+
spinUntilTrue:^BOOL{
|
|
193
|
+
return foregroundApp.state != XCUIApplicationStateRunningForeground;
|
|
194
|
+
} error:error];
|
|
195
|
+
}
|
|
196
|
+
#endif
|
|
197
|
+
|
|
142
198
|
- (BOOL)fb_lockScreen:(NSError **)error
|
|
143
199
|
{
|
|
144
200
|
if (fb_isLocked) {
|
|
145
201
|
return YES;
|
|
146
202
|
}
|
|
147
|
-
#if
|
|
148
|
-
[self
|
|
149
|
-
|
|
150
|
-
if (SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(@"27.0")) {
|
|
151
|
-
// iOS 27: pressLockButton no longer locks; use a direct IOHID Power press (0x0C/0x30, ~0.5s hold).
|
|
152
|
-
if (![self fb_performIOHIDEventWithPage:0x0C
|
|
153
|
-
usage:0x30
|
|
154
|
-
duration:0.5
|
|
155
|
-
error:error]) {
|
|
203
|
+
#if !TARGET_OS_TV && !TARGET_OS_WATCH
|
|
204
|
+
if ([FBHIDOperations appliesToDevice:self]) {
|
|
205
|
+
if (![FBHIDOperations pressLockWithError:error]) {
|
|
156
206
|
return NO;
|
|
157
207
|
}
|
|
158
|
-
} else
|
|
208
|
+
} else
|
|
209
|
+
#endif
|
|
210
|
+
{
|
|
211
|
+
#if TARGET_OS_SIMULATOR
|
|
159
212
|
[self pressLockButton];
|
|
160
|
-
|
|
213
|
+
#else
|
|
214
|
+
if (SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(@"27.0")) {
|
|
215
|
+
// iOS 27: pressLockButton no longer locks; use a short IOHID Power press.
|
|
216
|
+
// A 0.5s hold can invoke Siri instead of locking the screen.
|
|
217
|
+
const NSTimeInterval duration = 0.2;
|
|
218
|
+
if (![self fb_performIOHIDEventWithPage:0x0C
|
|
219
|
+
usage:0x30
|
|
220
|
+
duration:duration
|
|
221
|
+
error:error]) {
|
|
222
|
+
return NO;
|
|
223
|
+
}
|
|
224
|
+
} else {
|
|
225
|
+
[self pressLockButton];
|
|
226
|
+
}
|
|
161
227
|
#endif
|
|
228
|
+
}
|
|
162
229
|
return [[[[FBRunLoopSpinner new]
|
|
163
230
|
timeout:FBScreenLockTimeout]
|
|
164
231
|
timeoutErrorMessage:@"Timed out while waiting until the screen gets locked"]
|
|
@@ -177,14 +244,19 @@ static bool fb_isLocked;
|
|
|
177
244
|
if (!fb_isLocked) {
|
|
178
245
|
return YES;
|
|
179
246
|
}
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
247
|
+
for (NSUInteger attempt = 0; attempt < 2; attempt++) {
|
|
248
|
+
#if !TARGET_OS_TV && !TARGET_OS_WATCH
|
|
249
|
+
if ([FBHIDOperations appliesToDevice:self]) {
|
|
250
|
+
if (![FBHIDOperations pressHomeWithError:error]) {
|
|
251
|
+
return NO;
|
|
252
|
+
}
|
|
253
|
+
} else
|
|
186
254
|
#endif
|
|
187
|
-
|
|
255
|
+
{
|
|
256
|
+
[self pressButton:XCUIDeviceButtonHome];
|
|
257
|
+
}
|
|
258
|
+
[[NSRunLoop currentRunLoop] runUntilDate:[NSDate dateWithTimeIntervalSinceNow:FBHomeButtonCoolOffTime]];
|
|
259
|
+
}
|
|
188
260
|
return [[[[FBRunLoopSpinner new]
|
|
189
261
|
timeout:FBScreenLockTimeout]
|
|
190
262
|
timeoutErrorMessage:@"Timed out while waiting until the screen gets unlocked"]
|
|
@@ -307,7 +379,7 @@ static bool fb_isLocked;
|
|
|
307
379
|
|
|
308
380
|
- (BOOL)fb_hasButton:(NSString *)buttonName
|
|
309
381
|
{
|
|
310
|
-
return
|
|
382
|
+
return FBAvailableButtonNames()[buttonName.lowercaseString] != nil;
|
|
311
383
|
}
|
|
312
384
|
|
|
313
385
|
- (BOOL)fb_pressButton:(NSString *)buttonName
|
|
@@ -318,7 +390,7 @@ static bool fb_isLocked;
|
|
|
318
390
|
return [self fb_pressButton:buttonName error:error];
|
|
319
391
|
#else
|
|
320
392
|
|
|
321
|
-
NSDictionary<NSString *, NSNumber *> *availableButtons =
|
|
393
|
+
NSDictionary<NSString *, NSNumber *> *availableButtons = FBAvailableButtonNames();
|
|
322
394
|
NSNumber *buttonValue = availableButtons[buttonName.lowercaseString];
|
|
323
395
|
|
|
324
396
|
if (!buttonValue) {
|
|
@@ -342,7 +414,7 @@ static bool fb_isLocked;
|
|
|
342
414
|
- (BOOL)fb_pressButton:(NSString *)buttonName
|
|
343
415
|
error:(NSError **)error
|
|
344
416
|
{
|
|
345
|
-
NSDictionary<NSString *, NSNumber *> *availableButtons =
|
|
417
|
+
NSDictionary<NSString *, NSNumber *> *availableButtons = FBAvailableButtonNames();
|
|
346
418
|
NSNumber *buttonValue = availableButtons[buttonName.lowercaseString];
|
|
347
419
|
|
|
348
420
|
if (!buttonValue) {
|
|
@@ -351,6 +423,11 @@ static bool fb_isLocked;
|
|
|
351
423
|
withDescriptionFormat:@"The button '%@' is not supported. The device under test only supports the following buttons: %@", buttonName, sortedKeys]
|
|
352
424
|
buildError:error];
|
|
353
425
|
}
|
|
426
|
+
#if !TARGET_OS_TV && !TARGET_OS_WATCH
|
|
427
|
+
if (buttonValue.unsignedIntegerValue == XCUIDeviceButtonHome && [FBHIDOperations appliesToDevice:self]) {
|
|
428
|
+
return [FBHIDOperations pressHomeWithError:error];
|
|
429
|
+
}
|
|
430
|
+
#endif
|
|
354
431
|
[self pressButton:(XCUIDeviceButton)[buttonValue unsignedIntegerValue]];
|
|
355
432
|
return YES;
|
|
356
433
|
}
|
|
@@ -9,16 +9,23 @@
|
|
|
9
9
|
#import "XCUIDevice+FBRotation.h"
|
|
10
10
|
|
|
11
11
|
#import "FBConfiguration.h"
|
|
12
|
+
#import "FBHIDOperations.h"
|
|
12
13
|
#import "XCUIApplication.h"
|
|
13
14
|
#import "XCUIApplication+FBHelpers.h"
|
|
14
15
|
#import "XCUIElement+FBUtilities.h"
|
|
15
16
|
|
|
16
17
|
# if !TARGET_OS_TV && !TARGET_OS_WATCH
|
|
17
18
|
|
|
19
|
+
static UIInterfaceOrientation FBInterfaceOrientationFromDeviceOrientation(UIDeviceOrientation orientation);
|
|
20
|
+
|
|
18
21
|
@implementation XCUIDevice (FBRotation)
|
|
19
22
|
|
|
20
23
|
- (BOOL)fb_setDeviceInterfaceOrientation:(UIDeviceOrientation)orientation
|
|
21
24
|
{
|
|
25
|
+
if ([FBHIDOperations appliesToDevice:self]) {
|
|
26
|
+
return [FBHIDOperations rotateToOrientation:orientation
|
|
27
|
+
interfaceOrientation:FBInterfaceOrientationFromDeviceOrientation(orientation)];
|
|
28
|
+
}
|
|
22
29
|
XCUIApplication *application = XCUIApplication.fb_activeApplication;
|
|
23
30
|
[XCUIDevice sharedDevice].orientation = orientation;
|
|
24
31
|
return [self waitUntilInterfaceIsAtOrientation:orientation application:application];
|
|
@@ -31,9 +38,7 @@
|
|
|
31
38
|
return NO;
|
|
32
39
|
}
|
|
33
40
|
UIDeviceOrientation orientation = (UIDeviceOrientation)keysForRotationObj.firstObject.integerValue;
|
|
34
|
-
|
|
35
|
-
[XCUIDevice sharedDevice].orientation = orientation;
|
|
36
|
-
return [self waitUntilInterfaceIsAtOrientation:orientation application:application];
|
|
41
|
+
return [self fb_setDeviceInterfaceOrientation:orientation];
|
|
37
42
|
}
|
|
38
43
|
|
|
39
44
|
static UIInterfaceOrientation FBInterfaceOrientationFromDeviceOrientation(UIDeviceOrientation orientation)
|
|
@@ -21,6 +21,13 @@ NS_ASSUME_NONNULL_BEGIN
|
|
|
21
21
|
*/
|
|
22
22
|
BOOL FBTypeText(NSString *text, NSUInteger typingSpeed, NSError **error);
|
|
23
23
|
|
|
24
|
+
#if TARGET_OS_IOS
|
|
25
|
+
/**
|
|
26
|
+
Waits up to `timeout` seconds for a hittable key. A miss does not fail the caller.
|
|
27
|
+
*/
|
|
28
|
+
void FBWaitForHittableKey(XCUIApplication * _Nullable application, NSTimeInterval timeout);
|
|
29
|
+
#endif
|
|
30
|
+
|
|
24
31
|
@interface XCUIElement (FBTyping)
|
|
25
32
|
|
|
26
33
|
/**
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
|
|
11
11
|
#import "FBConfiguration.h"
|
|
12
12
|
#import "FBErrorBuilder.h"
|
|
13
|
+
#import "FBKeyboard.h"
|
|
13
14
|
#import "FBXCElementSnapshotWrapper.h"
|
|
14
15
|
#import "FBXCElementSnapshotWrapper+Helpers.h"
|
|
15
16
|
#import "FBXCodeCompatibility.h"
|
|
@@ -39,6 +40,19 @@ BOOL FBTypeText(NSString *text, NSUInteger typingSpeed, NSError **error)
|
|
|
39
40
|
return [FBXCTestDaemonsProxy synthesizeEventWithRecord:eventRecord error:error];
|
|
40
41
|
}
|
|
41
42
|
|
|
43
|
+
#if TARGET_OS_IOS
|
|
44
|
+
void FBWaitForHittableKey(XCUIApplication *application, NSTimeInterval timeout)
|
|
45
|
+
{
|
|
46
|
+
if (nil == application) {
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
NSError *visibilityError = nil;
|
|
50
|
+
[FBKeyboard waitUntilVisibleForApplication:application
|
|
51
|
+
timeout:timeout
|
|
52
|
+
error:&visibilityError];
|
|
53
|
+
}
|
|
54
|
+
#endif
|
|
55
|
+
|
|
42
56
|
@interface NSString (FBRepeat)
|
|
43
57
|
|
|
44
58
|
- (NSString *)fb_repeatTimes:(NSUInteger)times;
|
|
@@ -139,6 +153,12 @@ BOOL FBTypeText(NSString *text, NSUInteger typingSpeed, NSError **error)
|
|
|
139
153
|
// partial workaround (keystrokes still don't always land - a known limitation).
|
|
140
154
|
[self typeText:text];
|
|
141
155
|
return YES;
|
|
156
|
+
#elif TARGET_OS_IOS
|
|
157
|
+
NSTimeInterval keyboardWait = FBConfiguration.sharedInstance.keyboardWaitTimeout;
|
|
158
|
+
if (keyboardWait > 0) {
|
|
159
|
+
FBWaitForHittableKey(self.application, keyboardWait);
|
|
160
|
+
}
|
|
161
|
+
return FBTypeText(text, frequency, error);
|
|
142
162
|
#else
|
|
143
163
|
return FBTypeText(text, frequency, error);
|
|
144
164
|
#endif
|
|
@@ -25,6 +25,10 @@ NS_ASSUME_NONNULL_BEGIN
|
|
|
25
25
|
+ (nullable NSString *)sharedCredentialKey;
|
|
26
26
|
+ (void)setSharedCredentialKey:(nullable NSString *)key;
|
|
27
27
|
|
|
28
|
+
/// The setting `key`, with an absent key and a JSON null both read as not supplied.
|
|
29
|
+
+ (nullable id)settingNamed:(NSString *)key inSettings:(NSDictionary *)settings;
|
|
30
|
+
+ (BOOL)isArrayOfStrings:(id)value;
|
|
31
|
+
|
|
28
32
|
@end
|
|
29
33
|
|
|
30
34
|
NS_ASSUME_NONNULL_END
|