appium-webdriveragent 16.12.2 → 16.12.4
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/CHANGELOG.md +12 -0
- package/WebDriverAgent.xcodeproj/project.pbxproj +18 -8
- package/WebDriverAgent.xcodeproj/xcshareddata/xcschemes/IntegrationApp_watchOS.xcscheme +2 -0
- package/WebDriverAgentLib/Commands/FBCustomCommands.m +1 -1
- package/WebDriverAgentLib/Info.plist +2 -2
- package/WebDriverAgentTests/IntegrationApp/COORDINATE_PROBE.md +50 -0
- package/WebDriverAgentTests/IntegrationApp/Classes/FBCoordinateProbeViewController.h +4 -0
- package/WebDriverAgentTests/IntegrationApp/Classes/FBCoordinateProbeViewController.m +176 -0
- package/WebDriverAgentTests/IntegrationApp/Classes/ViewController.m +8 -2
- package/WebDriverAgentTests/IntegrationApp/Info.plist +2 -2
- package/WebDriverAgentTests/IntegrationApp/Resources/Base.lproj/Main.storyboard +27 -11
- package/WebDriverAgentTests/IntegrationTests/FBConfigurationTests.m +4 -5
- package/WebDriverAgentTests/IntegrationTests/FBIntegrationTestCase.m +1 -0
- package/WebDriverAgentTests/UnitTests/Doubles/XCUIElementDouble.h +3 -0
- package/WebDriverAgentTests/UnitTests/Doubles/XCUIElementDouble.m +9 -0
- package/WebDriverAgentTests/UnitTests/FBCustomCommandsTests.m +83 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
## [16.12.4](https://github.com/appium/WebDriverAgent/compare/v16.12.3...v16.12.4) (2026-09-06)
|
|
2
|
+
|
|
3
|
+
### Miscellaneous Chores
|
|
4
|
+
|
|
5
|
+
* add coordinate screen in the integration app ([#1251](https://github.com/appium/WebDriverAgent/issues/1251)) ([de6acac](https://github.com/appium/WebDriverAgent/commit/de6acac7ebbaf70915f0c09093e3a12623efcea2))
|
|
6
|
+
|
|
7
|
+
## [16.12.3](https://github.com/appium/WebDriverAgent/compare/v16.12.2...v16.12.3) (2026-09-04)
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* resolve key name lookup for dictionary-form keyboardInput keys ([#1247](https://github.com/appium/WebDriverAgent/issues/1247)) ([f40bac6](https://github.com/appium/WebDriverAgent/commit/f40bac6ea77f6220883fe4437ee63e51fe44d74f))
|
|
12
|
+
|
|
1
13
|
## [16.12.2](https://github.com/appium/WebDriverAgent/compare/v16.12.1...v16.12.2) (2026-09-03)
|
|
2
14
|
|
|
3
15
|
### Bug Fixes
|
|
@@ -118,6 +118,7 @@
|
|
|
118
118
|
205E75731851D363B53A61DE /* UITestingUITests.m in Sources */ = {isa = PBXBuildFile; fileRef = EE9AB7FD1CAEE048008C271F /* UITestingUITests.m */; };
|
|
119
119
|
208F3FB46E41B0A1C87B8800 /* FBScreenshot.m in Sources */ = {isa = PBXBuildFile; fileRef = 71C9EAAB25E8415A00470CD8 /* FBScreenshot.m */; };
|
|
120
120
|
2112EC67BDFFA4A0B2CF24EB /* RouteRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = D585660F7A04651223F29B07 /* RouteRequest.h */; };
|
|
121
|
+
21C0068C990412E75A135DD4 /* FBCustomCommandsTests.m in Sources */ = {isa = PBXBuildFile; fileRef = B817F776DE7106D3B7B1C049 /* FBCustomCommandsTests.m */; };
|
|
121
122
|
2238B4FC5C7DCD4B4215444D /* XCTMessagingRole_ProtectedResourceAuthorization-Protocol.h in Headers */ = {isa = PBXBuildFile; fileRef = CCCBEAE654102DBB1C8C22CD /* XCTMessagingRole_ProtectedResourceAuthorization-Protocol.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
|
122
123
|
227E3F36FAA2C3881F89FD81 /* WDAClickIntegrationTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = C878996F07A9B26E66FC4EAC /* WDAClickIntegrationTests.swift */; };
|
|
123
124
|
229F9F5B85C1255447495847 /* XCUIApplicationAutomationSessionProviding-Protocol.h in Headers */ = {isa = PBXBuildFile; fileRef = 603D97F0F9A5B9D4E6442BF2 /* XCUIApplicationAutomationSessionProviding-Protocol.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
|
@@ -604,7 +605,6 @@
|
|
|
604
605
|
716F0DA12A16CA1000CDD977 /* NSDictionary+FBUtf8SafeDictionary.h in Headers */ = {isa = PBXBuildFile; fileRef = 716F0D9F2A16CA1000CDD977 /* NSDictionary+FBUtf8SafeDictionary.h */; };
|
|
605
606
|
716F0DA32A16CA1000CDD977 /* NSDictionary+FBUtf8SafeDictionary.m in Sources */ = {isa = PBXBuildFile; fileRef = 716F0DA02A16CA1000CDD977 /* NSDictionary+FBUtf8SafeDictionary.m */; };
|
|
606
607
|
716F0DA62A17323300CDD977 /* NSDictionaryFBUtf8SafeTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 716F0DA52A17323300CDD977 /* NSDictionaryFBUtf8SafeTests.m */; };
|
|
607
|
-
E82332D32C4E06280CBE3F4C /* FBResponseJSONPayloadTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 3F5C37472190A686297D3534 /* FBResponseJSONPayloadTests.m */; };
|
|
608
608
|
7182A87F3CAA27F71B624AD2 /* XCTRunnerAutomationSession-Protocol.h in Headers */ = {isa = PBXBuildFile; fileRef = 01AF8E73DD47455B4854E470 /* XCTRunnerAutomationSession-Protocol.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
|
609
609
|
718F49C8230844330045FE8B /* FBProtocolHelpersTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 718F49C7230844330045FE8B /* FBProtocolHelpersTests.m */; };
|
|
610
610
|
718F49C923087ACF0045FE8B /* FBProtocolHelpers.h in Headers */ = {isa = PBXBuildFile; fileRef = 71B155DD23080CA600646AFB /* FBProtocolHelpers.h */; };
|
|
@@ -840,6 +840,7 @@
|
|
|
840
840
|
9E914062BD3388A4F3B8100B /* FBXPathExtensions.m in Sources */ = {isa = PBXBuildFile; fileRef = 71B2E0022733FB970074B002 /* FBXPathExtensions.m */; };
|
|
841
841
|
9E97481489FB2345F690578E /* XCTMessagingRole_HIDEventRecording-Protocol.h in Headers */ = {isa = PBXBuildFile; fileRef = 94D7F0C1E30FBDB5D2583908 /* XCTMessagingRole_HIDEventRecording-Protocol.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
|
842
842
|
9F9218F11A1D06F8DCC8308B /* FBXCElementSnapshotWrapper+Helpers.m in Sources */ = {isa = PBXBuildFile; fileRef = 13DE7A5A287CA444003243C6 /* FBXCElementSnapshotWrapper+Helpers.m */; };
|
|
843
|
+
A09D847635CA4C155583B967 /* FBXCAXClientProxyTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 6231A764C3FAAB29B87CD987 /* FBXCAXClientProxyTests.m */; };
|
|
843
844
|
A0A7AB48F1A3AEEC70AF92D7 /* XCTMessagingRole_ForcePressureSupportQuerying-Protocol.h in Headers */ = {isa = PBXBuildFile; fileRef = AA2351C66A4616534FB81AE4 /* XCTMessagingRole_ForcePressureSupportQuerying-Protocol.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
|
844
845
|
A14687C1A2FC70A2356B7839 /* XCUIApplicationImplReporter-Protocol.h in Headers */ = {isa = PBXBuildFile; fileRef = 221BC403F42F61DDB1F11DD0 /* XCUIApplicationImplReporter-Protocol.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
|
845
846
|
A14CB090646BCB0B50F213CF /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 5D7DD32943CAC7838F942ED5 /* ViewController.m */; };
|
|
@@ -931,6 +932,7 @@
|
|
|
931
932
|
BEA2FA45BED17FE03010FECD /* FBFindElementCommands.h in Headers */ = {isa = PBXBuildFile; fileRef = EE9AB7581CAEDF0C008C271F /* FBFindElementCommands.h */; };
|
|
932
933
|
BF9B191D841681A571BAFED1 /* _XCTestObservationPrivate-Protocol.h in Headers */ = {isa = PBXBuildFile; fileRef = C840A8703A7C8D48897E158A /* _XCTestObservationPrivate-Protocol.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
|
933
934
|
BFF5D9B9446DD542E5D6017D /* XCTTagSelection.h in Headers */ = {isa = PBXBuildFile; fileRef = 8E2092D85A7C691F157B1971 /* XCTTagSelection.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
|
935
|
+
C01249000000000000000003 /* FBCoordinateProbeViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = C01249000000000000000002 /* FBCoordinateProbeViewController.m */; };
|
|
934
936
|
C040AE5F2E3B934E8EEAEE0F /* XCUIApplicationProcessDelegate-Protocol.h in Headers */ = {isa = PBXBuildFile; fileRef = 43FCB89739438814F43BCA24 /* XCUIApplicationProcessDelegate-Protocol.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
|
935
937
|
C07F140AF96143A0A5CAA2B0 /* XCTestCaseDiscoveryUIAutomationDelegate-Protocol.h in Headers */ = {isa = PBXBuildFile; fileRef = E29888B75A756D1CCD21604C /* XCTestCaseDiscoveryUIAutomationDelegate-Protocol.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
|
936
938
|
C1414C29C836902466C4D6DB /* XCTestCastMethodNamesUIAutomationDelegate-Protocol.h in Headers */ = {isa = PBXBuildFile; fileRef = A80A1C12FA9899367D316E8C /* XCTestCastMethodNamesUIAutomationDelegate-Protocol.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
|
@@ -940,6 +942,7 @@
|
|
|
940
942
|
C22CA4AEE1C7395AE82B3BD3 /* XCTMessagingRole_PerformanceMeasurementReporting-Protocol.h in Headers */ = {isa = PBXBuildFile; fileRef = 2B650ADFEEA2369A10F6C1F1 /* XCTMessagingRole_PerformanceMeasurementReporting-Protocol.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
|
941
943
|
C2F6BB3D8A49F762E5172768 /* libxml2.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 7155B419224D5B460042A993 /* libxml2.tbd */; };
|
|
942
944
|
C309FAE89D050C90496FB87B /* XCTRemoteSignpostListenerProxy-Protocol.h in Headers */ = {isa = PBXBuildFile; fileRef = 8E47AA1A44A4A3C6EDCB6804 /* XCTRemoteSignpostListenerProxy-Protocol.h */; };
|
|
945
|
+
C312172CE7EE9B10B7A3034B /* FBHTTPServerSessionTests.m in Sources */ = {isa = PBXBuildFile; fileRef = FB741D78562232A78902B374 /* FBHTTPServerSessionTests.m */; };
|
|
943
946
|
C3A3578B56BF260A77EB1ECF /* XCUIAlertMonitoring-Protocol.h in Headers */ = {isa = PBXBuildFile; fileRef = DB5797DE5A0B4E7EE3D166F7 /* XCUIAlertMonitoring-Protocol.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
|
944
947
|
C3E6942879518EC529341A25 /* XCTRemoteSignpostListenerProxy-Protocol.h in Headers */ = {isa = PBXBuildFile; fileRef = 8E47AA1A44A4A3C6EDCB6804 /* XCTRemoteSignpostListenerProxy-Protocol.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
|
945
948
|
C3F7218DAB6B07E34AFDDF44 /* WatchSpikeApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = AAE921136A147FD01D630869 /* WatchSpikeApp.swift */; };
|
|
@@ -1017,6 +1020,7 @@
|
|
|
1017
1020
|
DE2D708340ED70EBF9244D0F /* NSDictionary+FBUtf8SafeDictionary.h in Headers */ = {isa = PBXBuildFile; fileRef = 716F0D9F2A16CA1000CDD977 /* NSDictionary+FBUtf8SafeDictionary.h */; };
|
|
1018
1021
|
DE75F01A64FBC6A58012E6B4 /* FBXCElementSnapshotDouble.m in Sources */ = {isa = PBXBuildFile; fileRef = F46F78706C5157469122F730 /* FBXCElementSnapshotDouble.m */; };
|
|
1019
1022
|
DF0FF8388E4C4CFDD1746BF7 /* XCTRunnerIDESessionDelegate-Protocol.h in Headers */ = {isa = PBXBuildFile; fileRef = 8A5EC96F8F1C3888B9E24FAA /* XCTRunnerIDESessionDelegate-Protocol.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
|
1023
|
+
DF82F4A8758B79DD91FA20CC /* FBHTTPServerTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 76B7399DDF52C85A21433C1D /* FBHTTPServerTests.m */; };
|
|
1020
1024
|
DFB9638AF3480053CA39AB3C /* XCUIElement+FBVisibleFrame.h in Headers */ = {isa = PBXBuildFile; fileRef = 71AE3CF52D38EE8E0039FC36 /* XCUIElement+FBVisibleFrame.h */; };
|
|
1021
1025
|
DFC01347FC6A5308D5C6765D /* XCTMessagingRole_MemoryTesting-Protocol.h in Headers */ = {isa = PBXBuildFile; fileRef = 13D863EAE7F6F8B7E42D99B9 /* XCTMessagingRole_MemoryTesting-Protocol.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
|
1022
1026
|
E046D4602540FA7272DCBCB4 /* XCUIElement+FBWebDriverAttributes.m in Sources */ = {isa = PBXBuildFile; fileRef = EEE376481D59FAE900ED88DD /* XCUIElement+FBWebDriverAttributes.m */; };
|
|
@@ -1039,6 +1043,7 @@
|
|
|
1039
1043
|
E66195839119DC5A8BB7A5D9 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DD1ABD1093739852B52C472B /* Foundation.framework */; };
|
|
1040
1044
|
E6B214145FE46BBFD824FAE7 /* FBMathUtils.h in Headers */ = {isa = PBXBuildFile; fileRef = EE1888381DA661C400307AA8 /* FBMathUtils.h */; };
|
|
1041
1045
|
E78F581F8E7530B24AC31A8B /* XCTMessagingRole_UIAutomation-Protocol.h in Headers */ = {isa = PBXBuildFile; fileRef = 92182E4007B37665AB8CD88E /* XCTMessagingRole_UIAutomation-Protocol.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
|
1046
|
+
E82332D32C4E06280CBE3F4C /* FBResponseJSONPayloadTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 3F5C37472190A686297D3534 /* FBResponseJSONPayloadTests.m */; };
|
|
1042
1047
|
E8E894CD81C41AC4467A4F4C /* XCTCapabilities.h in Headers */ = {isa = PBXBuildFile; fileRef = DB5400B170F08C71779CCD0E /* XCTCapabilities.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
|
1043
1048
|
E8E917CF8B3ADB4F24CD0B96 /* _TtC10XCTestCore19XCTReportingContext.h in Headers */ = {isa = PBXBuildFile; fileRef = 2DFEF3D0F3F006AC53F9E525 /* _TtC10XCTestCore19XCTReportingContext.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
|
1044
1049
|
E8FE8448E0118775E7C789CC /* FBXMLGenerationOptions.h in Headers */ = {isa = PBXBuildFile; fileRef = 714D88CA2733FB970074A925 /* FBXMLGenerationOptions.h */; };
|
|
@@ -1158,7 +1163,6 @@
|
|
|
1158
1163
|
EE3A18661CDE734B00DE4205 /* FBKeyboard.h in Headers */ = {isa = PBXBuildFile; fileRef = EE3A18641CDE734B00DE4205 /* FBKeyboard.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
|
1159
1164
|
EE3A18671CDE734B00DE4205 /* FBKeyboard.m in Sources */ = {isa = PBXBuildFile; fileRef = EE3A18651CDE734B00DE4205 /* FBKeyboard.m */; };
|
|
1160
1165
|
EE3F8CFE1D08AA17006F02CE /* FBRunLoopSpinnerTests.m in Sources */ = {isa = PBXBuildFile; fileRef = EE3F8CFD1D08AA17006F02CE /* FBRunLoopSpinnerTests.m */; };
|
|
1161
|
-
A09D847635CA4C155583B967 /* FBXCAXClientProxyTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 6231A764C3FAAB29B87CD987 /* FBXCAXClientProxyTests.m */; };
|
|
1162
1166
|
EE3F8D001D08B05F006F02CE /* FBElementTypeTransformerTests.m in Sources */ = {isa = PBXBuildFile; fileRef = EE3F8CFF1D08B05F006F02CE /* FBElementTypeTransformerTests.m */; };
|
|
1163
1167
|
EE5095E51EBCC9090028E2FE /* FBTypingTest.m in Sources */ = {isa = PBXBuildFile; fileRef = AD76723F1D6B826F00610457 /* FBTypingTest.m */; };
|
|
1164
1168
|
EE5095EB1EBCC9090028E2FE /* XCElementSnapshotHitPointTests.m in Sources */ = {isa = PBXBuildFile; fileRef = EE006EB21EBA1C7B006900A4 /* XCElementSnapshotHitPointTests.m */; };
|
|
@@ -1191,8 +1195,6 @@
|
|
|
1191
1195
|
EE8DDD7F20C5733C004D4925 /* XCUIElement+FBForceTouch.h in Headers */ = {isa = PBXBuildFile; fileRef = EE8DDD7D20C5733C004D4925 /* XCUIElement+FBForceTouch.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
|
1192
1196
|
EE9AB8011CAEE048008C271F /* UITestingUITests.m in Sources */ = {isa = PBXBuildFile; fileRef = EE9AB7FD1CAEE048008C271F /* UITestingUITests.m */; };
|
|
1193
1197
|
EE9B76591CF7987800275851 /* FBRouteTests.m in Sources */ = {isa = PBXBuildFile; fileRef = EE9B76571CF7987300275851 /* FBRouteTests.m */; };
|
|
1194
|
-
C312172CE7EE9B10B7A3034B /* FBHTTPServerSessionTests.m in Sources */ = {isa = PBXBuildFile; fileRef = FB741D78562232A78902B374 /* FBHTTPServerSessionTests.m */; };
|
|
1195
|
-
DF82F4A8758B79DD91FA20CC /* FBHTTPServerTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 76B7399DDF52C85A21433C1D /* FBHTTPServerTests.m */; };
|
|
1196
1198
|
EE9B768E1CF7997600275851 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = EE9B76831CF7997600275851 /* AppDelegate.m */; };
|
|
1197
1199
|
EE9B768F1CF7997600275851 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = EE9B76851CF7997600275851 /* ViewController.m */; };
|
|
1198
1200
|
EE9B76911CF7997600275851 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = EE9B76871CF7997600275851 /* main.m */; };
|
|
@@ -1478,6 +1480,7 @@
|
|
|
1478
1480
|
3BA71BCF1FDA482419CA8596 /* XCUIPlatformApplicationServicesProviding-Protocol.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "XCUIPlatformApplicationServicesProviding-Protocol.h"; sourceTree = "<group>"; };
|
|
1479
1481
|
3C710FE3AB9E9C22BD2A9E84 /* XCUIApplicationProcessManaging-Protocol.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "XCUIApplicationProcessManaging-Protocol.h"; sourceTree = "<group>"; };
|
|
1480
1482
|
3DD2F42015E89D253EA57F63 /* XCUIRemoteAccessibilityInterface-Protocol.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "XCUIRemoteAccessibilityInterface-Protocol.h"; sourceTree = "<group>"; };
|
|
1483
|
+
3F5C37472190A686297D3534 /* FBResponseJSONPayloadTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = FBResponseJSONPayloadTests.m; sourceTree = "<group>"; };
|
|
1481
1484
|
42D2B5A0C490D9698C2A87A9 /* XCTMacCatalystStatusProviding-Protocol.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "XCTMacCatalystStatusProviding-Protocol.h"; sourceTree = "<group>"; };
|
|
1482
1485
|
42F7AB68482BA168011C52EA /* XCTTestSelection.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = XCTTestSelection.h; sourceTree = "<group>"; };
|
|
1483
1486
|
43FCB89739438814F43BCA24 /* XCUIApplicationProcessDelegate-Protocol.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "XCUIApplicationProcessDelegate-Protocol.h"; sourceTree = "<group>"; };
|
|
@@ -1498,6 +1501,7 @@
|
|
|
1498
1501
|
5CF2F53B94CC13C628FC7760 /* XCUIDeviceAutomationModeInterface-Protocol.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "XCUIDeviceAutomationModeInterface-Protocol.h"; sourceTree = "<group>"; };
|
|
1499
1502
|
5D7DD32943CAC7838F942ED5 /* ViewController.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = "<group>"; };
|
|
1500
1503
|
603D97F0F9A5B9D4E6442BF2 /* XCUIApplicationAutomationSessionProviding-Protocol.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "XCUIApplicationAutomationSessionProviding-Protocol.h"; sourceTree = "<group>"; };
|
|
1504
|
+
6231A764C3FAAB29B87CD987 /* FBXCAXClientProxyTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = FBXCAXClientProxyTests.m; sourceTree = "<group>"; };
|
|
1501
1505
|
62A682C55077710D1D90ABC3 /* XCTMessagingRole_CapabilityExchange-Protocol.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "XCTMessagingRole_CapabilityExchange-Protocol.h"; sourceTree = "<group>"; };
|
|
1502
1506
|
631B523421F6174300625362 /* FBImageProcessorTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = FBImageProcessorTests.m; sourceTree = "<group>"; };
|
|
1503
1507
|
633E904A220DEE7F007CADF9 /* XCUIApplicationProcessDelay.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XCUIApplicationProcessDelay.h; sourceTree = "<group>"; };
|
|
@@ -1599,7 +1603,6 @@
|
|
|
1599
1603
|
716F0D9F2A16CA1000CDD977 /* NSDictionary+FBUtf8SafeDictionary.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "NSDictionary+FBUtf8SafeDictionary.h"; sourceTree = "<group>"; };
|
|
1600
1604
|
716F0DA02A16CA1000CDD977 /* NSDictionary+FBUtf8SafeDictionary.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "NSDictionary+FBUtf8SafeDictionary.m"; sourceTree = "<group>"; };
|
|
1601
1605
|
716F0DA52A17323300CDD977 /* NSDictionaryFBUtf8SafeTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = NSDictionaryFBUtf8SafeTests.m; sourceTree = "<group>"; };
|
|
1602
|
-
3F5C37472190A686297D3534 /* FBResponseJSONPayloadTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = FBResponseJSONPayloadTests.m; sourceTree = "<group>"; };
|
|
1603
1606
|
717C0D702518ED2800CAA6EC /* TVOSSettings.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = TVOSSettings.xcconfig; sourceTree = "<group>"; };
|
|
1604
1607
|
717C0D862518ED7000CAA6EC /* TVOSTestSettings.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = TVOSTestSettings.xcconfig; sourceTree = "<group>"; };
|
|
1605
1608
|
7183E8C2B556594311CB8898 /* XCUIRemoteSiriInterface-Protocol.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "XCUIRemoteSiriInterface-Protocol.h"; sourceTree = "<group>"; };
|
|
@@ -1676,6 +1679,7 @@
|
|
|
1676
1679
|
75438FC693C39052C82C27DB /* XCUIApplicationRegistry.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = XCUIApplicationRegistry.h; sourceTree = "<group>"; };
|
|
1677
1680
|
758FC0D745C185A2C28BEDA1 /* IntegrationApp_watchOS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = IntegrationApp_watchOS.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
|
1678
1681
|
75F677B5B7737E7E1F321C20 /* WDAScreenshotAndSourceIntegrationTests.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = WDAScreenshotAndSourceIntegrationTests.swift; sourceTree = "<group>"; };
|
|
1682
|
+
76B7399DDF52C85A21433C1D /* FBHTTPServerTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = FBHTTPServerTests.m; sourceTree = "<group>"; };
|
|
1679
1683
|
7AA21CEBA6E92AAC73FB6A48 /* XCTAggregateSuiteRunStatistics.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = XCTAggregateSuiteRunStatistics.h; sourceTree = "<group>"; };
|
|
1680
1684
|
7CBAA574F7786985E01D0B6F /* XCTHarnessEventReporting-Protocol.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "XCTHarnessEventReporting-Protocol.h"; sourceTree = "<group>"; };
|
|
1681
1685
|
7E079E00FE148476F94BC42F /* XCTTestIdentifierSet.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = XCTTestIdentifierSet.h; sourceTree = "<group>"; };
|
|
@@ -1741,9 +1745,12 @@
|
|
|
1741
1745
|
B38AC76FAF9275974F272DE9 /* XCUIEventRecording-Protocol.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "XCUIEventRecording-Protocol.h"; sourceTree = "<group>"; };
|
|
1742
1746
|
B3FDA51EB36F03592BF48762 /* XCTMeasureOptions.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = XCTMeasureOptions.h; sourceTree = "<group>"; };
|
|
1743
1747
|
B43D656732067585371ADD31 /* XCTMessagingRole_ProcessMonitoring-Protocol.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "XCTMessagingRole_ProcessMonitoring-Protocol.h"; sourceTree = "<group>"; };
|
|
1748
|
+
B817F776DE7106D3B7B1C049 /* FBCustomCommandsTests.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = FBCustomCommandsTests.m; sourceTree = "<group>"; };
|
|
1744
1749
|
B8A163261EFA440E42CA6AC1 /* XCTRunnerDaemonSessionUIAutomationDelegate-Protocol.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "XCTRunnerDaemonSessionUIAutomationDelegate-Protocol.h"; sourceTree = "<group>"; };
|
|
1745
1750
|
B98A9F937EF98D6359FCCC7A /* XCTRuntimeIssueDetectionPolicy.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = XCTRuntimeIssueDetectionPolicy.h; sourceTree = "<group>"; };
|
|
1746
1751
|
BCED63DFD03326F6351165FE /* WDAFindIntegrationTests.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = WDAFindIntegrationTests.swift; sourceTree = "<group>"; };
|
|
1752
|
+
C01249000000000000000001 /* FBCoordinateProbeViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FBCoordinateProbeViewController.h; sourceTree = "<group>"; };
|
|
1753
|
+
C01249000000000000000002 /* FBCoordinateProbeViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = FBCoordinateProbeViewController.m; sourceTree = "<group>"; };
|
|
1747
1754
|
C840A8703A7C8D48897E158A /* _XCTestObservationPrivate-Protocol.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "_XCTestObservationPrivate-Protocol.h"; sourceTree = "<group>"; };
|
|
1748
1755
|
C878996F07A9B26E66FC4EAC /* WDAClickIntegrationTests.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = WDAClickIntegrationTests.swift; sourceTree = "<group>"; };
|
|
1749
1756
|
C8FB547322D3949C00B69954 /* LSApplicationWorkspace.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LSApplicationWorkspace.h; sourceTree = "<group>"; };
|
|
@@ -1829,7 +1836,6 @@
|
|
|
1829
1836
|
EE3A18641CDE734B00DE4205 /* FBKeyboard.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FBKeyboard.h; path = WebDriverAgentLib/Utilities/FBKeyboard.h; sourceTree = SOURCE_ROOT; };
|
|
1830
1837
|
EE3A18651CDE734B00DE4205 /* FBKeyboard.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = FBKeyboard.m; path = WebDriverAgentLib/Utilities/FBKeyboard.m; sourceTree = SOURCE_ROOT; };
|
|
1831
1838
|
EE3F8CFD1D08AA17006F02CE /* FBRunLoopSpinnerTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FBRunLoopSpinnerTests.m; sourceTree = "<group>"; };
|
|
1832
|
-
6231A764C3FAAB29B87CD987 /* FBXCAXClientProxyTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = FBXCAXClientProxyTests.m; sourceTree = "<group>"; };
|
|
1833
1839
|
EE3F8CFF1D08B05F006F02CE /* FBElementTypeTransformerTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FBElementTypeTransformerTests.m; sourceTree = "<group>"; };
|
|
1834
1840
|
EE5095FE1EBCC9090028E2FE /* IntegrationTests_2.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = IntegrationTests_2.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
|
|
1835
1841
|
EE55B3221D1D5388003AAAEC /* FBTableDataSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FBTableDataSource.h; sourceTree = "<group>"; };
|
|
@@ -1909,8 +1915,6 @@
|
|
|
1909
1915
|
EE9B75D41CF7956C00275851 /* IntegrationApp.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = IntegrationApp.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
|
1910
1916
|
EE9B75EC1CF7956C00275851 /* IntegrationTests_1.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = IntegrationTests_1.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
|
|
1911
1917
|
EE9B76571CF7987300275851 /* FBRouteTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = FBRouteTests.m; sourceTree = "<group>"; };
|
|
1912
|
-
FB741D78562232A78902B374 /* FBHTTPServerSessionTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = FBHTTPServerSessionTests.m; sourceTree = "<group>"; };
|
|
1913
|
-
76B7399DDF52C85A21433C1D /* FBHTTPServerTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = FBHTTPServerTests.m; sourceTree = "<group>"; };
|
|
1914
1918
|
EE9B76581CF7987300275851 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
|
1915
1919
|
EE9B76821CF7997600275851 /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
|
|
1916
1920
|
EE9B76831CF7997600275851 /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
|
|
@@ -1954,6 +1958,7 @@
|
|
|
1954
1958
|
F46F78706C5157469122F730 /* FBXCElementSnapshotDouble.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = FBXCElementSnapshotDouble.m; sourceTree = "<group>"; };
|
|
1955
1959
|
F59CD6D22EF16E5E00F91287 /* XCUIElement+FBCustomActions.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "XCUIElement+FBCustomActions.h"; sourceTree = "<group>"; };
|
|
1956
1960
|
F59CD6D32EF16E5E00F91287 /* XCUIElement+FBCustomActions.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "XCUIElement+FBCustomActions.m"; sourceTree = "<group>"; };
|
|
1961
|
+
FB741D78562232A78902B374 /* FBHTTPServerSessionTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = FBHTTPServerSessionTests.m; sourceTree = "<group>"; };
|
|
1957
1962
|
FCD1815F2BF21CA0936B04E1 /* XCTMessagingRole_SiriAutomation-Protocol.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "XCTMessagingRole_SiriAutomation-Protocol.h"; sourceTree = "<group>"; };
|
|
1958
1963
|
FDB15E393EA0850C004D26B2 /* XCTScreenCapturePolicy.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = XCTScreenCapturePolicy.h; sourceTree = "<group>"; };
|
|
1959
1964
|
FF8E3B470FC9639D5F18E2EA /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
|
@@ -2697,6 +2702,7 @@
|
|
|
2697
2702
|
7139145B1DF01A12005896C2 /* NSExpressionFBFormatTests.m */,
|
|
2698
2703
|
71A224E71DE326C500844D55 /* NSPredicateFBFormatTests.m */,
|
|
2699
2704
|
713914591DF01989005896C2 /* XCUIElementHelpersTests.m */,
|
|
2705
|
+
B817F776DE7106D3B7B1C049 /* FBCustomCommandsTests.m */,
|
|
2700
2706
|
);
|
|
2701
2707
|
path = UnitTests;
|
|
2702
2708
|
sourceTree = "<group>";
|
|
@@ -2729,6 +2735,8 @@
|
|
|
2729
2735
|
EE55B3231D1D5388003AAAEC /* FBTableDataSource.m */,
|
|
2730
2736
|
EE9B76841CF7997600275851 /* ViewController.h */,
|
|
2731
2737
|
EE9B76851CF7997600275851 /* ViewController.m */,
|
|
2738
|
+
C01249000000000000000001 /* FBCoordinateProbeViewController.h */,
|
|
2739
|
+
C01249000000000000000002 /* FBCoordinateProbeViewController.m */,
|
|
2732
2740
|
315A14FF2518CB8700A3A064 /* TouchableView.h */,
|
|
2733
2741
|
315A15002518CB8700A3A064 /* TouchableView.m */,
|
|
2734
2742
|
315A15052518CC2800A3A064 /* TouchSpotView.h */,
|
|
@@ -4834,6 +4842,7 @@
|
|
|
4834
4842
|
EE6A89261D0B19E60083E92B /* FBSessionTests.m in Sources */,
|
|
4835
4843
|
71A7EAFC1E229302001DA4F2 /* FBClassChainTests.m in Sources */,
|
|
4836
4844
|
EE18883D1DA663EB00307AA8 /* FBMathUtilsTests.m in Sources */,
|
|
4845
|
+
21C0068C990412E75A135DD4 /* FBCustomCommandsTests.m in Sources */,
|
|
4837
4846
|
);
|
|
4838
4847
|
runOnlyForDeploymentPostprocessing = 0;
|
|
4839
4848
|
};
|
|
@@ -4847,6 +4856,7 @@
|
|
|
4847
4856
|
315A15072518CC2800A3A064 /* TouchSpotView.m in Sources */,
|
|
4848
4857
|
EE9B76911CF7997600275851 /* main.m in Sources */,
|
|
4849
4858
|
EE9B768F1CF7997600275851 /* ViewController.m in Sources */,
|
|
4859
|
+
C01249000000000000000003 /* FBCoordinateProbeViewController.m in Sources */,
|
|
4850
4860
|
315A15012518CB8700A3A064 /* TouchableView.m in Sources */,
|
|
4851
4861
|
315A150A2518D6F400A3A064 /* TouchViewController.m in Sources */,
|
|
4852
4862
|
ADDA07241D6BB2BF001700AC /* FBScrollViewController.m in Sources */,
|
|
@@ -46,6 +46,7 @@
|
|
|
46
46
|
BuildableIdentifier = "primary"
|
|
47
47
|
BlueprintIdentifier = "9D6B02D8FC050BAF7159284F"
|
|
48
48
|
BuildableName = "IntegrationApp_watchOS.app"
|
|
49
|
+
BlueprintName = "IntegrationApp_watchOS"
|
|
49
50
|
ReferencedContainer = "container:WebDriverAgent.xcodeproj">
|
|
50
51
|
</BuildableReference>
|
|
51
52
|
</BuildableProductRunnable>
|
|
@@ -62,6 +63,7 @@
|
|
|
62
63
|
BuildableIdentifier = "primary"
|
|
63
64
|
BlueprintIdentifier = "9D6B02D8FC050BAF7159284F"
|
|
64
65
|
BuildableName = "IntegrationApp_watchOS.app"
|
|
66
|
+
BlueprintName = "IntegrationApp_watchOS"
|
|
65
67
|
ReferencedContainer = "container:WebDriverAgent.xcodeproj">
|
|
66
68
|
</BuildableReference>
|
|
67
69
|
</BuildableProductRunnable>
|
|
@@ -676,7 +676,7 @@
|
|
|
676
676
|
if ([modifiers isKindOfClass:NSNumber.class]) {
|
|
677
677
|
modifierFlags = [(NSNumber *)modifiers unsignedIntValue];
|
|
678
678
|
}
|
|
679
|
-
NSString *keyValue = [FBKeyboard keyValueForName:
|
|
679
|
+
NSString *keyValue = [FBKeyboard keyValueForName:key] ?: key;
|
|
680
680
|
[destination typeKey:keyValue modifierFlags:(XCUIKeyModifierFlags)modifierFlags];
|
|
681
681
|
} else {
|
|
682
682
|
NSString *message = @"All items of the 'keys' array must be either dictionaries or strings";
|
|
@@ -15,11 +15,11 @@
|
|
|
15
15
|
<key>CFBundlePackageType</key>
|
|
16
16
|
<string>FMWK</string>
|
|
17
17
|
<key>CFBundleShortVersionString</key>
|
|
18
|
-
<string>16.12.
|
|
18
|
+
<string>16.12.4</string>
|
|
19
19
|
<key>CFBundleSignature</key>
|
|
20
20
|
<string>????</string>
|
|
21
21
|
<key>CFBundleVersion</key>
|
|
22
|
-
<string>16.12.
|
|
22
|
+
<string>16.12.4</string>
|
|
23
23
|
<key>NSPrincipalClass</key>
|
|
24
24
|
<string/>
|
|
25
25
|
</dict>
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# Coordinate probe
|
|
2
|
+
|
|
3
|
+
Open **Coordinate Probe** below **DeepHierarchy** on the IntegrationApp home screen.
|
|
4
|
+
Use the standard Back button to return to the existing fixtures. Opening the probe
|
|
5
|
+
creates a fresh measurement session.
|
|
6
|
+
|
|
7
|
+
The **Touch** canvas records actual `UITouch.locationInView:` coordinates rather
|
|
8
|
+
than assuming that a gesture succeeded because it hit a large button. **Scroll**
|
|
9
|
+
shows 80 numbered rows, each 44 points high.
|
|
10
|
+
|
|
11
|
+
## Automation identifiers
|
|
12
|
+
|
|
13
|
+
| Identifier | Purpose |
|
|
14
|
+
| --- | --- |
|
|
15
|
+
| `coordinate-probe` | Home screen button that opens the probe |
|
|
16
|
+
| `probe-status` | Label containing the measurement JSON |
|
|
17
|
+
| `coordinate-canvas` | Touch target |
|
|
18
|
+
| `probe-mode` | Touch/Scroll segmented control |
|
|
19
|
+
| `probe-table` | Scrollable table |
|
|
20
|
+
| `probe-row-0` through `probe-row-79` | Individual table rows |
|
|
21
|
+
|
|
22
|
+
The `probe-status` label exposes `start`, `last`, `phase`, and `count` after a
|
|
23
|
+
touch. `start` and `last` are **canvas-local app points**. It also exposes
|
|
24
|
+
`canvasBounds`, `canvasWindowRect`, `windowSize`, `screenSize`, and `scrollY`.
|
|
25
|
+
Geometry is refreshed when the view lays out, including after rotation or window
|
|
26
|
+
resizing. Touch-related fields are absent before the first touch.
|
|
27
|
+
|
|
28
|
+
For example, locate `coordinate-probe` by accessibility ID and click it. Then
|
|
29
|
+
locate `coordinate-canvas`, send an element-relative action, and read the JSON
|
|
30
|
+
from `probe-status`. Check that `count` increased and compare `start`/`last` with
|
|
31
|
+
the expected canvas-local point within a suitable tolerance. Derive test offsets
|
|
32
|
+
from the current element rectangle rather than hard-coding a device size.
|
|
33
|
+
|
|
34
|
+
## Native and compatibility builds
|
|
35
|
+
|
|
36
|
+
The screen uses the same source for both configurations. Keep the IntegrationApp
|
|
37
|
+
scheme and set the build's `TARGETED_DEVICE_FAMILY`:
|
|
38
|
+
|
|
39
|
+
- `1,2`: native support for iPhone and iPad (the existing default).
|
|
40
|
+
- `1`: iPhone-only; install on iPad to exercise iPhone compatibility mode.
|
|
41
|
+
|
|
42
|
+
These are build settings, not a switch within the running app. Verify the actual
|
|
43
|
+
window and element frames before interpreting results. An iPad-native app can
|
|
44
|
+
also run in a resized window; maximize it when testing a full-screen native case.
|
|
45
|
+
For the compatibility case, compare app and SpringBoard window sizes and the
|
|
46
|
+
reported element rectangles with the recorded probe geometry.
|
|
47
|
+
|
|
48
|
+
If keeping both builds installed at once, give them distinct bundle IDs. This
|
|
49
|
+
change does not add another app target or alter the existing bundle ID or signing
|
|
50
|
+
configuration.
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
#import "FBCoordinateProbeViewController.h"
|
|
2
|
+
|
|
3
|
+
@interface FBCoordinateProbeCanvas : UIView
|
|
4
|
+
@property (nonatomic, copy) void (^onTouch)(NSString *phase, CGPoint point);
|
|
5
|
+
@end
|
|
6
|
+
|
|
7
|
+
@implementation FBCoordinateProbeCanvas
|
|
8
|
+
|
|
9
|
+
- (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event
|
|
10
|
+
{
|
|
11
|
+
self.onTouch(@"began", [touches.anyObject locationInView:self]);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
- (void)touchesMoved:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event
|
|
15
|
+
{
|
|
16
|
+
self.onTouch(@"moved", [touches.anyObject locationInView:self]);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
- (void)touchesEnded:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event
|
|
20
|
+
{
|
|
21
|
+
self.onTouch(@"ended", [touches.anyObject locationInView:self]);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
- (void)touchesCancelled:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event
|
|
25
|
+
{
|
|
26
|
+
self.onTouch(@"cancelled", [touches.anyObject locationInView:self]);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
- (void)drawRect:(CGRect)rect
|
|
30
|
+
{
|
|
31
|
+
CGContextRef context = UIGraphicsGetCurrentContext();
|
|
32
|
+
CGContextSetStrokeColorWithColor(context, UIColor.whiteColor.CGColor);
|
|
33
|
+
for (NSInteger i = 1; i < 4; i++) {
|
|
34
|
+
CGFloat x = CGRectGetWidth(self.bounds) * i / 4.0;
|
|
35
|
+
CGFloat y = CGRectGetHeight(self.bounds) * i / 4.0;
|
|
36
|
+
CGContextMoveToPoint(context, x, 0);
|
|
37
|
+
CGContextAddLineToPoint(context, x, CGRectGetHeight(self.bounds));
|
|
38
|
+
CGContextMoveToPoint(context, 0, y);
|
|
39
|
+
CGContextAddLineToPoint(context, CGRectGetWidth(self.bounds), y);
|
|
40
|
+
}
|
|
41
|
+
CGContextStrokePath(context);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
@end
|
|
45
|
+
|
|
46
|
+
@interface FBCoordinateProbeViewController () <UITableViewDataSource, UITableViewDelegate>
|
|
47
|
+
@property (nonatomic, strong) UILabel *statusLabel;
|
|
48
|
+
@property (nonatomic, strong) UISegmentedControl *modeControl;
|
|
49
|
+
@property (nonatomic, strong) FBCoordinateProbeCanvas *canvas;
|
|
50
|
+
@property (nonatomic, strong) UITableView *table;
|
|
51
|
+
@property (nonatomic, strong) NSMutableDictionary<NSString *, id> *measurement;
|
|
52
|
+
@property (nonatomic) NSUInteger touchCount;
|
|
53
|
+
@end
|
|
54
|
+
|
|
55
|
+
@implementation FBCoordinateProbeViewController
|
|
56
|
+
|
|
57
|
+
- (void)viewDidLoad
|
|
58
|
+
{
|
|
59
|
+
[super viewDidLoad];
|
|
60
|
+
self.title = @"Coordinate Probe";
|
|
61
|
+
self.view.backgroundColor = UIColor.systemBackgroundColor;
|
|
62
|
+
self.measurement = [NSMutableDictionary dictionary];
|
|
63
|
+
|
|
64
|
+
self.statusLabel = [UILabel new];
|
|
65
|
+
self.statusLabel.accessibilityIdentifier = @"probe-status";
|
|
66
|
+
self.statusLabel.font = [UIFont monospacedSystemFontOfSize:10 weight:UIFontWeightRegular];
|
|
67
|
+
self.statusLabel.numberOfLines = 0;
|
|
68
|
+
[self.view addSubview:self.statusLabel];
|
|
69
|
+
|
|
70
|
+
self.modeControl = [[UISegmentedControl alloc] initWithItems:@[@"Touch", @"Scroll"]];
|
|
71
|
+
self.modeControl.accessibilityIdentifier = @"probe-mode";
|
|
72
|
+
self.modeControl.selectedSegmentIndex = 0;
|
|
73
|
+
[self.modeControl addTarget:self action:@selector(modeChanged) forControlEvents:UIControlEventValueChanged];
|
|
74
|
+
[self.view addSubview:self.modeControl];
|
|
75
|
+
|
|
76
|
+
self.canvas = [FBCoordinateProbeCanvas new];
|
|
77
|
+
self.canvas.backgroundColor = UIColor.systemBlueColor;
|
|
78
|
+
self.canvas.isAccessibilityElement = YES;
|
|
79
|
+
self.canvas.accessibilityIdentifier = @"coordinate-canvas";
|
|
80
|
+
self.canvas.accessibilityLabel = @"Coordinate canvas";
|
|
81
|
+
self.canvas.accessibilityTraits = UIAccessibilityTraitAllowsDirectInteraction;
|
|
82
|
+
self.canvas.contentMode = UIViewContentModeRedraw;
|
|
83
|
+
__weak typeof(self) weakSelf = self;
|
|
84
|
+
self.canvas.onTouch = ^(NSString *phase, CGPoint point) {
|
|
85
|
+
FBCoordinateProbeViewController *controller = weakSelf;
|
|
86
|
+
if (nil == controller) {
|
|
87
|
+
return;
|
|
88
|
+
}
|
|
89
|
+
if ([phase isEqualToString:@"began"]) {
|
|
90
|
+
controller.touchCount++;
|
|
91
|
+
controller.measurement[@"start"] = @[@(point.x), @(point.y)];
|
|
92
|
+
}
|
|
93
|
+
controller.measurement[@"last"] = @[@(point.x), @(point.y)];
|
|
94
|
+
controller.measurement[@"phase"] = phase;
|
|
95
|
+
controller.measurement[@"count"] = @(controller.touchCount);
|
|
96
|
+
[controller publishMeasurement];
|
|
97
|
+
};
|
|
98
|
+
[self.view addSubview:self.canvas];
|
|
99
|
+
|
|
100
|
+
self.table = [[UITableView alloc] initWithFrame:CGRectZero style:UITableViewStylePlain];
|
|
101
|
+
self.table.accessibilityIdentifier = @"probe-table";
|
|
102
|
+
self.table.rowHeight = 44;
|
|
103
|
+
self.table.dataSource = self;
|
|
104
|
+
self.table.delegate = self;
|
|
105
|
+
self.table.hidden = YES;
|
|
106
|
+
[self.view addSubview:self.table];
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
- (void)viewDidLayoutSubviews
|
|
110
|
+
{
|
|
111
|
+
[super viewDidLayoutSubviews];
|
|
112
|
+
// Use the app's actual available area, including navigation bars and resized iPad windows.
|
|
113
|
+
CGRect safeFrame = self.view.safeAreaLayoutGuide.layoutFrame;
|
|
114
|
+
CGFloat width = MAX(0, CGRectGetWidth(safeFrame) - 40);
|
|
115
|
+
CGFloat left = CGRectGetMinX(safeFrame) + 20;
|
|
116
|
+
CGFloat top = CGRectGetMinY(safeFrame) + 8;
|
|
117
|
+
self.statusLabel.frame = CGRectMake(left, top, width, 96);
|
|
118
|
+
self.modeControl.frame = CGRectMake(left, top + 104, width, 30);
|
|
119
|
+
CGRect contentFrame = CGRectMake(left, top + 146, width,
|
|
120
|
+
MAX(0, CGRectGetMaxY(safeFrame) - top - 166));
|
|
121
|
+
self.canvas.frame = contentFrame;
|
|
122
|
+
self.table.frame = contentFrame;
|
|
123
|
+
[self publishMeasurement];
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
- (void)publishMeasurement
|
|
127
|
+
{
|
|
128
|
+
UIWindow *window = self.view.window;
|
|
129
|
+
if (nil == window) {
|
|
130
|
+
return;
|
|
131
|
+
}
|
|
132
|
+
CGRect bounds = self.canvas.bounds;
|
|
133
|
+
CGRect frame = [self.canvas convertRect:bounds toView:window];
|
|
134
|
+
// Touch coordinates are local to the canvas. Window geometry lets tests compare
|
|
135
|
+
// those measurements with WDA's element rectangles without assuming a screen size.
|
|
136
|
+
self.measurement[@"canvasBounds"] = @[@(bounds.size.width), @(bounds.size.height)];
|
|
137
|
+
self.measurement[@"canvasWindowRect"] = @[@(frame.origin.x), @(frame.origin.y),
|
|
138
|
+
@(frame.size.width), @(frame.size.height)];
|
|
139
|
+
self.measurement[@"windowSize"] = @[@(window.bounds.size.width), @(window.bounds.size.height)];
|
|
140
|
+
self.measurement[@"screenSize"] = @[@(window.screen.bounds.size.width), @(window.screen.bounds.size.height)];
|
|
141
|
+
self.measurement[@"scrollY"] = @(self.table.contentOffset.y);
|
|
142
|
+
NSData *data = [NSJSONSerialization dataWithJSONObject:self.measurement
|
|
143
|
+
options:NSJSONWritingSortedKeys
|
|
144
|
+
error:nil];
|
|
145
|
+
self.statusLabel.text = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
- (void)modeChanged
|
|
149
|
+
{
|
|
150
|
+
self.canvas.hidden = self.modeControl.selectedSegmentIndex == 1;
|
|
151
|
+
self.table.hidden = !self.canvas.hidden;
|
|
152
|
+
[self publishMeasurement];
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
|
|
156
|
+
{
|
|
157
|
+
return 80;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
|
|
161
|
+
{
|
|
162
|
+
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"probe-row"];
|
|
163
|
+
if (nil == cell) {
|
|
164
|
+
cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"probe-row"];
|
|
165
|
+
}
|
|
166
|
+
cell.textLabel.text = [NSString stringWithFormat:@"Probe row %ld", (long)indexPath.row];
|
|
167
|
+
cell.accessibilityIdentifier = [NSString stringWithFormat:@"probe-row-%ld", (long)indexPath.row];
|
|
168
|
+
return cell;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
- (void)scrollViewDidScroll:(UIScrollView *)scrollView
|
|
172
|
+
{
|
|
173
|
+
[self publishMeasurement];
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
@end
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
#import "ViewController.h"
|
|
10
|
+
#import "FBCoordinateProbeViewController.h"
|
|
10
11
|
|
|
11
12
|
@interface ViewController ()
|
|
12
13
|
@property (weak, nonatomic) IBOutlet UILabel *orentationLabel;
|
|
@@ -30,6 +31,11 @@
|
|
|
30
31
|
self.button.accessibilityCustomActions = @[action1, action2];
|
|
31
32
|
}
|
|
32
33
|
|
|
34
|
+
- (IBAction)showCoordinateProbe:(id)sender
|
|
35
|
+
{
|
|
36
|
+
[self.navigationController pushViewController:[FBCoordinateProbeViewController new] animated:NO];
|
|
37
|
+
}
|
|
38
|
+
|
|
33
39
|
- (BOOL)handleCustomAction:(UIAccessibilityCustomAction *)action
|
|
34
40
|
{
|
|
35
41
|
// Custom action handler - just return YES to indicate success
|
|
@@ -57,13 +63,13 @@
|
|
|
57
63
|
// lay out. This page exists purely as a fixture for exercising element
|
|
58
64
|
// lookups (e.g. class chain locators) against a deep accessibility tree.
|
|
59
65
|
UIViewController *deepHierarchyViewController = [UIViewController new];
|
|
60
|
-
deepHierarchyViewController.view.backgroundColor = UIColor.
|
|
66
|
+
deepHierarchyViewController.view.backgroundColor = UIColor.systemBackgroundColor;
|
|
61
67
|
deepHierarchyViewController.view.accessibilityIdentifier = @"DeepHierarchyPage";
|
|
62
68
|
|
|
63
69
|
NSInteger depth = 70;
|
|
64
70
|
// A plain UILabel sibling, not part of the nested chain below, so the
|
|
65
71
|
// fixture stays recognizable to a human glancing at the simulator instead
|
|
66
|
-
// of showing a blank
|
|
72
|
+
// of showing a blank screen.
|
|
67
73
|
UILabel *titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(20, 60, CGRectGetWidth(UIScreen.mainScreen.bounds) - 40, 60)];
|
|
68
74
|
titleLabel.text = [NSString stringWithFormat:@"Deep Hierarchy\n%ld nested elements", (long)depth];
|
|
69
75
|
titleLabel.numberOfLines = 2;
|
|
@@ -30,8 +30,6 @@
|
|
|
30
30
|
<string>Yo Yo</string>
|
|
31
31
|
<key>NSPhotoLibraryUsageDescription</key>
|
|
32
32
|
<string>Yo Yo</string>
|
|
33
|
-
<key>UILaunchStoryboardName</key>
|
|
34
|
-
<string>LaunchScreen</string>
|
|
35
33
|
<key>UIApplicationSceneManifest</key>
|
|
36
34
|
<dict>
|
|
37
35
|
<key>UIApplicationSupportsMultipleScenes</key>
|
|
@@ -49,6 +47,8 @@
|
|
|
49
47
|
</array>
|
|
50
48
|
</dict>
|
|
51
49
|
</dict>
|
|
50
|
+
<key>UILaunchStoryboardName</key>
|
|
51
|
+
<string>LaunchScreen</string>
|
|
52
52
|
<key>UIRequiredDeviceCapabilities</key>
|
|
53
53
|
<array>
|
|
54
54
|
<string>armv7</string>
|
|
@@ -83,8 +83,19 @@
|
|
|
83
83
|
<action selector="goToDeepHierarchy:" destination="BYZ-38-t0r" eventType="touchUpInside" id="dHi-03-Act"/>
|
|
84
84
|
</connections>
|
|
85
85
|
</button>
|
|
86
|
+
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="cPr-01-Btn">
|
|
87
|
+
<rect key="frame" x="139" y="418" width="136" height="30"/>
|
|
88
|
+
<accessibility key="accessibilityConfiguration" identifier="coordinate-probe"/>
|
|
89
|
+
<constraints>
|
|
90
|
+
<constraint firstAttribute="height" constant="30" id="cPr-02-Hgt"/>
|
|
91
|
+
</constraints>
|
|
92
|
+
<state key="normal" title="Coordinate Probe"/>
|
|
93
|
+
<connections>
|
|
94
|
+
<action selector="showCoordinateProbe:" destination="BYZ-38-t0r" eventType="touchUpInside" id="cPr-03-Act"/>
|
|
95
|
+
</connections>
|
|
96
|
+
</button>
|
|
86
97
|
</subviews>
|
|
87
|
-
<color key="backgroundColor"
|
|
98
|
+
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
|
|
88
99
|
<accessibility key="accessibilityConfiguration" label="MainView"/>
|
|
89
100
|
<constraints>
|
|
90
101
|
<constraint firstItem="YgP-SF-TkS" firstAttribute="centerX" secondItem="8bC-Xf-vdC" secondAttribute="centerX" id="41Q-cm-l5K"/>
|
|
@@ -101,6 +112,8 @@
|
|
|
101
112
|
<constraint firstItem="M2N-Yn-ytb" firstAttribute="top" secondItem="YgP-SF-TkS" secondAttribute="bottom" constant="8" id="tMN-gl-smg"/>
|
|
102
113
|
<constraint firstItem="dHi-01-Btn" firstAttribute="centerX" secondItem="8bC-Xf-vdC" secondAttribute="centerX" id="dHi-04-Cnt"/>
|
|
103
114
|
<constraint firstItem="dHi-01-Btn" firstAttribute="top" secondItem="1Ht-AF-MGW" secondAttribute="bottom" constant="8" id="dHi-05-Top"/>
|
|
115
|
+
<constraint firstItem="cPr-01-Btn" firstAttribute="centerX" secondItem="8bC-Xf-vdC" secondAttribute="centerX" id="cPr-04-Cnt"/>
|
|
116
|
+
<constraint firstItem="cPr-01-Btn" firstAttribute="top" secondItem="dHi-01-Btn" secondAttribute="bottom" constant="8" id="cPr-05-Top"/>
|
|
104
117
|
</constraints>
|
|
105
118
|
</view>
|
|
106
119
|
<navigationItem key="navigationItem" id="dmu-Fe-aoT"/>
|
|
@@ -237,7 +250,7 @@
|
|
|
237
250
|
<constraint firstAttribute="height" constant="21" id="VBZ-ac-GvI"/>
|
|
238
251
|
</constraints>
|
|
239
252
|
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
|
240
|
-
<color key="textColor"
|
|
253
|
+
<color key="textColor" systemColor="labelColor"/>
|
|
241
254
|
<nil key="highlightedColor"/>
|
|
242
255
|
</label>
|
|
243
256
|
<segmentedControl opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="top" segmentControlStyle="plain" selectedSegmentIndex="0" translatesAutoresizingMaskIntoConstraints="NO" id="Wim-fT-xNl">
|
|
@@ -282,7 +295,7 @@
|
|
|
282
295
|
<constraint firstAttribute="height" constant="21" id="664-Z3-V7W"/>
|
|
283
296
|
</constraints>
|
|
284
297
|
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
|
285
|
-
<color key="textColor"
|
|
298
|
+
<color key="textColor" systemColor="labelColor"/>
|
|
286
299
|
<nil key="highlightedColor"/>
|
|
287
300
|
</label>
|
|
288
301
|
<label hidden="YES" opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="hidden_invisible" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="vt6-b1-U0h">
|
|
@@ -291,7 +304,7 @@
|
|
|
291
304
|
<constraint firstAttribute="height" constant="21" id="51j-sl-XYd"/>
|
|
292
305
|
</constraints>
|
|
293
306
|
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
|
294
|
-
<color key="textColor"
|
|
307
|
+
<color key="textColor" systemColor="labelColor"/>
|
|
295
308
|
<nil key="highlightedColor"/>
|
|
296
309
|
</label>
|
|
297
310
|
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="GsS-jO-scK">
|
|
@@ -319,7 +332,7 @@
|
|
|
319
332
|
<textInputTraits key="textInputTraits" autocorrectionType="no" spellCheckingType="no"/>
|
|
320
333
|
</textField>
|
|
321
334
|
</subviews>
|
|
322
|
-
<color key="backgroundColor"
|
|
335
|
+
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
|
|
323
336
|
<constraints>
|
|
324
337
|
<constraint firstItem="GsS-jO-scK" firstAttribute="leading" secondItem="Ucg-Ag-VpP" secondAttribute="leadingMargin" constant="154" id="1RA-Fx-3Jh"/>
|
|
325
338
|
<constraint firstItem="SjL-dx-Zsi" firstAttribute="top" secondItem="U7D-NR-20N" secondAttribute="bottom" constant="8" id="3NW-Hc-tPr"/>
|
|
@@ -445,7 +458,7 @@
|
|
|
445
458
|
<constraint firstAttribute="height" constant="21" id="2qA-NT-ddc"/>
|
|
446
459
|
</constraints>
|
|
447
460
|
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
|
448
|
-
<color key="textColor"
|
|
461
|
+
<color key="textColor" systemColor="labelColor"/>
|
|
449
462
|
<nil key="highlightedColor"/>
|
|
450
463
|
</label>
|
|
451
464
|
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="3Zk-wE-jwj">
|
|
@@ -466,7 +479,7 @@
|
|
|
466
479
|
<state key="normal" title="Create Alert (Force Touch)"/>
|
|
467
480
|
</button>
|
|
468
481
|
</subviews>
|
|
469
|
-
<color key="backgroundColor"
|
|
482
|
+
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
|
|
470
483
|
<constraints>
|
|
471
484
|
<constraint firstItem="3Zk-wE-jwj" firstAttribute="centerX" secondItem="JWE-cA-TW0" secondAttribute="centerX" id="83u-1W-xLt"/>
|
|
472
485
|
<constraint firstItem="D7g-22-s49" firstAttribute="centerX" secondItem="JWE-cA-TW0" secondAttribute="centerX" id="9nT-k0-9gf"/>
|
|
@@ -527,7 +540,7 @@
|
|
|
527
540
|
</connections>
|
|
528
541
|
</button>
|
|
529
542
|
</subviews>
|
|
530
|
-
<color key="backgroundColor"
|
|
543
|
+
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
|
|
531
544
|
<constraints>
|
|
532
545
|
<constraint firstItem="vYb-QB-vwU" firstAttribute="centerX" secondItem="55R-aH-x4M" secondAttribute="centerX" id="0MT-Eq-8dG"/>
|
|
533
546
|
<constraint firstItem="vYb-QB-vwU" firstAttribute="top" secondItem="yvD-8P-ibI" secondAttribute="bottom" constant="20" id="c3y-G3-HCj"/>
|
|
@@ -548,7 +561,7 @@
|
|
|
548
561
|
<tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="44" sectionHeaderHeight="28" sectionFooterHeight="28" id="jo0-3M-nUd">
|
|
549
562
|
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
|
|
550
563
|
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
|
551
|
-
<color key="backgroundColor"
|
|
564
|
+
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
|
|
552
565
|
<prototypes>
|
|
553
566
|
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="Cell" textLabel="2mC-E2-VxB" style="IBUITableViewCellStyleDefault" id="wCs-18-PFf">
|
|
554
567
|
<rect key="frame" x="0.0" y="50" width="414" height="44"/>
|
|
@@ -561,7 +574,7 @@
|
|
|
561
574
|
<rect key="frame" x="20" y="0.0" width="374" height="44"/>
|
|
562
575
|
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
|
563
576
|
<fontDescription key="fontDescription" type="system" pointSize="16"/>
|
|
564
|
-
<color key="textColor"
|
|
577
|
+
<color key="textColor" systemColor="labelColor"/>
|
|
565
578
|
<nil key="highlightedColor"/>
|
|
566
579
|
</label>
|
|
567
580
|
</subviews>
|
|
@@ -603,7 +616,7 @@
|
|
|
603
616
|
</userDefinedRuntimeAttributes>
|
|
604
617
|
</scrollView>
|
|
605
618
|
</subviews>
|
|
606
|
-
<color key="backgroundColor"
|
|
619
|
+
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
|
|
607
620
|
<constraints>
|
|
608
621
|
<constraint firstItem="xEQ-MI-a2g" firstAttribute="top" secondItem="KLL-RT-L40" secondAttribute="top" id="Bep-no-nwg"/>
|
|
609
622
|
<constraint firstAttribute="trailing" secondItem="xEQ-MI-a2g" secondAttribute="trailing" id="akP-zz-jsv"/>
|
|
@@ -624,6 +637,9 @@
|
|
|
624
637
|
</scene>
|
|
625
638
|
</scenes>
|
|
626
639
|
<resources>
|
|
640
|
+
<systemColor name="labelColor">
|
|
641
|
+
<color white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
|
642
|
+
</systemColor>
|
|
627
643
|
<systemColor name="systemBackgroundColor">
|
|
628
644
|
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
|
629
645
|
</systemColor>
|
|
@@ -21,14 +21,10 @@
|
|
|
21
21
|
|
|
22
22
|
@implementation FBConfigurationTests
|
|
23
23
|
|
|
24
|
-
- (void)
|
|
24
|
+
- (void)testReduceMotion
|
|
25
25
|
{
|
|
26
|
-
[super setUp];
|
|
27
26
|
[self launchApplication];
|
|
28
|
-
}
|
|
29
27
|
|
|
30
|
-
- (void)testReduceMotion
|
|
31
|
-
{
|
|
32
28
|
BOOL defaultReduceMotionEnabled = FBConfiguration.sharedInstance.reduceMotionEnabled;
|
|
33
29
|
|
|
34
30
|
FBConfiguration.sharedInstance.reduceMotionEnabled = YES;
|
|
@@ -44,6 +40,9 @@
|
|
|
44
40
|
XCTSkip(@"Deliberately freezes the app for several seconds, too slow/flaky for CI");
|
|
45
41
|
}
|
|
46
42
|
|
|
43
|
+
// Launch only after the CI skip so a skipped test cannot time out in app startup.
|
|
44
|
+
[self launchApplication];
|
|
45
|
+
|
|
47
46
|
NSTimeInterval previousDeadline = FBConfiguration.sharedInstance.accessibilityDeadline;
|
|
48
47
|
// Also bounds any snapshot-based wait -tap itself may perform once the app is stuck.
|
|
49
48
|
FBConfiguration.sharedInstance.accessibilityDeadline = 3.0;
|
|
@@ -45,8 +45,11 @@
|
|
|
45
45
|
- (id _Nonnull)fb_standardSnapshot;
|
|
46
46
|
- (id _Nonnull)fb_customSnapshot;
|
|
47
47
|
- (nullable id)query;
|
|
48
|
+
- (void)typeKey:(nonnull NSString *)key modifierFlags:(NSUInteger)modifierFlags;
|
|
48
49
|
|
|
49
50
|
// Checks
|
|
50
51
|
@property (nonatomic, assign, readonly) BOOL didResolve;
|
|
52
|
+
@property (nonatomic, copy, readonly, nonnull) NSArray<NSString *> *typedKeys;
|
|
53
|
+
@property (nonatomic, assign, readonly) NSUInteger lastTypedModifierFlags;
|
|
51
54
|
|
|
52
55
|
@end
|
|
@@ -10,6 +10,8 @@
|
|
|
10
10
|
|
|
11
11
|
@interface XCUIElementDouble ()
|
|
12
12
|
@property (nonatomic, assign, readwrite) BOOL didResolve;
|
|
13
|
+
@property (nonatomic, copy, readwrite, nonnull) NSArray<NSString *> *typedKeys;
|
|
14
|
+
@property (nonatomic, assign, readwrite) NSUInteger lastTypedModifierFlags;
|
|
13
15
|
@end
|
|
14
16
|
|
|
15
17
|
@implementation XCUIElementDouble
|
|
@@ -48,10 +50,17 @@
|
|
|
48
50
|
self.wdType = @"XCUIElementTypeOther";
|
|
49
51
|
self.wdUID = @"0";
|
|
50
52
|
self.lastSnapshot = nil;
|
|
53
|
+
self.typedKeys = @[];
|
|
51
54
|
}
|
|
52
55
|
return self;
|
|
53
56
|
}
|
|
54
57
|
|
|
58
|
+
- (void)typeKey:(NSString *)key modifierFlags:(NSUInteger)modifierFlags
|
|
59
|
+
{
|
|
60
|
+
self.typedKeys = [self.typedKeys arrayByAddingObject:key];
|
|
61
|
+
self.lastTypedModifierFlags = modifierFlags;
|
|
62
|
+
}
|
|
63
|
+
|
|
55
64
|
- (id)fb_valueForWDAttributeName:(NSString *)name
|
|
56
65
|
{
|
|
57
66
|
return @"test";
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2015-present, Facebook, Inc.
|
|
3
|
+
* All rights reserved.
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the BSD-style license found in the
|
|
6
|
+
* LICENSE file in the root directory of this source tree.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
#import <XCTest/XCTest.h>
|
|
10
|
+
|
|
11
|
+
#import "FBCustomCommands.h"
|
|
12
|
+
#import "FBElementCache.h"
|
|
13
|
+
#import "FBRouteRequest-Private.h"
|
|
14
|
+
#import "FBSession.h"
|
|
15
|
+
#import "Doubles/XCUIElementDouble.h"
|
|
16
|
+
|
|
17
|
+
#if !TARGET_OS_TV && __clang_major__ >= 15
|
|
18
|
+
|
|
19
|
+
@interface FBCustomCommands (FBWDATestable)
|
|
20
|
+
+ (id<FBResponsePayload>)handleKeyboardInput:(FBRouteRequest *)request;
|
|
21
|
+
@end
|
|
22
|
+
|
|
23
|
+
@interface FBCustomCommandsTests : XCTestCase
|
|
24
|
+
@property (nonatomic, strong) FBSession *session;
|
|
25
|
+
@end
|
|
26
|
+
|
|
27
|
+
@implementation FBCustomCommandsTests
|
|
28
|
+
|
|
29
|
+
- (void)setUp
|
|
30
|
+
{
|
|
31
|
+
[super setUp];
|
|
32
|
+
self.session = [FBSession initWithApplication:nil];
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
- (void)tearDown
|
|
36
|
+
{
|
|
37
|
+
[self.session kill];
|
|
38
|
+
[super tearDown];
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
- (FBRouteRequest *)requestWithElement:(XCUIElementDouble *)element keys:(NSArray *)keys
|
|
42
|
+
{
|
|
43
|
+
// uuid "0" is reserved by handleKeyboardInput: to mean "no element" (use the active application).
|
|
44
|
+
element.wdUID = @"1";
|
|
45
|
+
NSString *uuid = [self.session.elementCache storeElement:(XCUIElement *)element];
|
|
46
|
+
FBRouteRequest *request = [FBRouteRequest routeRequestWithURL:[NSURL URLWithString:@"http://localhost:8100/"]
|
|
47
|
+
parameters:@{@"uuid": uuid}
|
|
48
|
+
arguments:@{@"keys": keys}];
|
|
49
|
+
request.session = self.session;
|
|
50
|
+
return request;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
- (void)testDictionaryKeyWithConstantNameIsResolved
|
|
54
|
+
{
|
|
55
|
+
XCUIElementDouble *element = XCUIElementDouble.new;
|
|
56
|
+
FBRouteRequest *request = [self requestWithElement:element
|
|
57
|
+
keys:@[@{@"key": @"XCUIKeyboardKeyTab"}]];
|
|
58
|
+
[FBCustomCommands handleKeyboardInput:request];
|
|
59
|
+
XCTAssertEqualObjects(element.typedKeys, @[XCUIKeyboardKeyTab]);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
- (void)testDictionaryKeyWithLiteralCharacterIsPassedThrough
|
|
63
|
+
{
|
|
64
|
+
XCUIElementDouble *element = XCUIElementDouble.new;
|
|
65
|
+
FBRouteRequest *request = [self requestWithElement:element
|
|
66
|
+
keys:@[@{@"key": @"a"}]];
|
|
67
|
+
[FBCustomCommands handleKeyboardInput:request];
|
|
68
|
+
XCTAssertEqualObjects(element.typedKeys, @[@"a"]);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
- (void)testDictionaryKeyWithConstantNameAndModifierFlagsIsResolved
|
|
72
|
+
{
|
|
73
|
+
XCUIElementDouble *element = XCUIElementDouble.new;
|
|
74
|
+
FBRouteRequest *request = [self requestWithElement:element
|
|
75
|
+
keys:@[@{@"key": @"XCUIKeyboardKeyTab", @"modifierFlags": @2}]];
|
|
76
|
+
[FBCustomCommands handleKeyboardInput:request];
|
|
77
|
+
XCTAssertEqualObjects(element.typedKeys, @[XCUIKeyboardKeyTab]);
|
|
78
|
+
XCTAssertEqual(element.lastTypedModifierFlags, 2);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
@end
|
|
82
|
+
|
|
83
|
+
#endif
|