appium-webdriveragent 16.9.0 → 16.9.2
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 +18 -0
- package/WebDriverAgent.xcodeproj/project.pbxproj +4 -0
- package/WebDriverAgent.xcodeproj/xcshareddata/xcschemes/IntegrationTests_1.xcscheme +7 -0
- package/WebDriverAgent.xcodeproj/xcshareddata/xcschemes/IntegrationTests_2.xcscheme +7 -0
- package/WebDriverAgent.xcodeproj/xcshareddata/xcschemes/IntegrationTests_3.xcscheme +7 -0
- package/WebDriverAgent.xcodeproj/xcshareddata/xcschemes/IntegrationTests_tvOS.xcscheme +7 -0
- package/WebDriverAgent.xcodeproj/xcshareddata/xcschemes/IntegrationTests_watchOS.xcscheme +7 -0
- package/WebDriverAgentLib/Categories/NSDictionary+FBUtf8SafeDictionary.m +45 -27
- package/WebDriverAgentLib/Categories/XCUIElement+FBClassChain.m +2 -4
- package/WebDriverAgentLib/Categories/XCUIElement+FBUtilities.m +4 -2
- package/WebDriverAgentLib/Info.plist +2 -2
- package/WebDriverAgentLib/Routing/FBResponseJSONPayload.m +2 -3
- package/WebDriverAgentLib/Utilities/FBXCodeCompatibility.m +5 -5
- package/WebDriverAgentLib/Utilities/FBXPath.m +3 -2
- package/WebDriverAgentTests/IntegrationTests/FBAutoAlertsHandlerTests.m +10 -4
- package/WebDriverAgentTests/IntegrationTests/FBConfigurationTests.m +1 -1
- package/WebDriverAgentTests/IntegrationTests/FBElementAttributeTests.m +1 -1
- package/WebDriverAgentTests/IntegrationTests/FBElementVisibilityTests.m +6 -13
- package/WebDriverAgentTests/IntegrationTests/FBForceTouchTests.m +3 -3
- package/WebDriverAgentTests/IntegrationTests/FBIntegrationTestCase.h +7 -5
- package/WebDriverAgentTests/IntegrationTests/FBIntegrationTestCase.m +6 -8
- package/WebDriverAgentTests/IntegrationTests/FBSafariAlertTests.m +5 -1
- package/WebDriverAgentTests/IntegrationTests/FBScrollingTests.m +3 -6
- package/WebDriverAgentTests/IntegrationTests/FBVideoRecordingTests.m +1 -2
- package/WebDriverAgentTests/IntegrationTests/FBVoiceOverTests.m +5 -5
- package/WebDriverAgentTests/IntegrationTests/FBW3CTouchActionsIntegrationTests.m +1 -1
- package/WebDriverAgentTests/IntegrationTests/FBW3CTypeActionsTests.m +3 -3
- package/WebDriverAgentTests/IntegrationTests/XCUIApplicationHelperTests.m +1 -1
- package/WebDriverAgentTests/IntegrationTests/XCUIDeviceHelperTests.m +5 -5
- package/WebDriverAgentTests/IntegrationTests/XCUIElementFBFindTests.m +22 -0
- package/WebDriverAgentTests/UnitTests/FBResponseJSONPayloadTests.m +76 -0
- package/WebDriverAgentTests/UnitTests/NSDictionaryFBUtf8SafeTests.m +43 -0
- package/build/lib/types.d.ts +11 -0
- package/build/lib/types.d.ts.map +1 -1
- package/lib/types.ts +11 -0
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,21 @@
|
|
|
1
|
+
## [16.9.2](https://github.com/appium/WebDriverAgent/compare/v16.9.1...v16.9.2) (2026-08-28)
|
|
2
|
+
|
|
3
|
+
### Bug Fixes
|
|
4
|
+
|
|
5
|
+
* cache the testmanagerd protocol version fallback on timeout ([#1228](https://github.com/appium/WebDriverAgent/issues/1228)) ([f3d8e0c](https://github.com/appium/WebDriverAgent/commit/f3d8e0ce42488b6e95a74f1c59e0f20a500d1a54))
|
|
6
|
+
* sanitize non-UTF-8-encodable strings before JSON response serialization ([#1236](https://github.com/appium/WebDriverAgent/issues/1236)) ([fa6a250](https://github.com/appium/WebDriverAgent/commit/fa6a2503222ac2ffd039cb73a96689467774d7f2))
|
|
7
|
+
|
|
8
|
+
### Miscellaneous Chores
|
|
9
|
+
|
|
10
|
+
* **deps:** bump @appium/strongbox from 1.1.3 to 2.0.0 ([#1237](https://github.com/appium/WebDriverAgent/issues/1237)) ([03db844](https://github.com/appium/WebDriverAgent/commit/03db844ee0cb408bb323d0d77241ba55188c47f3))
|
|
11
|
+
|
|
12
|
+
## [16.9.1](https://github.com/appium/WebDriverAgent/compare/v16.9.0...v16.9.1) (2026-08-28)
|
|
13
|
+
|
|
14
|
+
### Bug Fixes
|
|
15
|
+
|
|
16
|
+
* add missing settings to the exported WDASettings/WDACapabilities types ([#1230](https://github.com/appium/WebDriverAgent/issues/1230)) ([a9e8203](https://github.com/appium/WebDriverAgent/commit/a9e8203d71051db7a0c14c192288b2b5115cf5cf))
|
|
17
|
+
* do not trust XCUIElement.lastSnapshot for long-lived elements ([#1235](https://github.com/appium/WebDriverAgent/issues/1235)) ([57968cc](https://github.com/appium/WebDriverAgent/commit/57968cc58b69ea9f036d70a694a0c9a5b6f764f7))
|
|
18
|
+
|
|
1
19
|
## [16.9.0](https://github.com/appium/WebDriverAgent/compare/v16.8.0...v16.9.0) (2026-08-27)
|
|
2
20
|
|
|
3
21
|
### Features
|
|
@@ -604,6 +604,7 @@
|
|
|
604
604
|
716F0DA12A16CA1000CDD977 /* NSDictionary+FBUtf8SafeDictionary.h in Headers */ = {isa = PBXBuildFile; fileRef = 716F0D9F2A16CA1000CDD977 /* NSDictionary+FBUtf8SafeDictionary.h */; };
|
|
605
605
|
716F0DA32A16CA1000CDD977 /* NSDictionary+FBUtf8SafeDictionary.m in Sources */ = {isa = PBXBuildFile; fileRef = 716F0DA02A16CA1000CDD977 /* NSDictionary+FBUtf8SafeDictionary.m */; };
|
|
606
606
|
716F0DA62A17323300CDD977 /* NSDictionaryFBUtf8SafeTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 716F0DA52A17323300CDD977 /* NSDictionaryFBUtf8SafeTests.m */; };
|
|
607
|
+
E82332D32C4E06280CBE3F4C /* FBResponseJSONPayloadTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 3F5C37472190A686297D3534 /* FBResponseJSONPayloadTests.m */; };
|
|
607
608
|
7182A87F3CAA27F71B624AD2 /* XCTRunnerAutomationSession-Protocol.h in Headers */ = {isa = PBXBuildFile; fileRef = 01AF8E73DD47455B4854E470 /* XCTRunnerAutomationSession-Protocol.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
|
608
609
|
718F49C8230844330045FE8B /* FBProtocolHelpersTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 718F49C7230844330045FE8B /* FBProtocolHelpersTests.m */; };
|
|
609
610
|
718F49C923087ACF0045FE8B /* FBProtocolHelpers.h in Headers */ = {isa = PBXBuildFile; fileRef = 71B155DD23080CA600646AFB /* FBProtocolHelpers.h */; };
|
|
@@ -1595,6 +1596,7 @@
|
|
|
1595
1596
|
716F0D9F2A16CA1000CDD977 /* NSDictionary+FBUtf8SafeDictionary.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "NSDictionary+FBUtf8SafeDictionary.h"; sourceTree = "<group>"; };
|
|
1596
1597
|
716F0DA02A16CA1000CDD977 /* NSDictionary+FBUtf8SafeDictionary.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "NSDictionary+FBUtf8SafeDictionary.m"; sourceTree = "<group>"; };
|
|
1597
1598
|
716F0DA52A17323300CDD977 /* NSDictionaryFBUtf8SafeTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = NSDictionaryFBUtf8SafeTests.m; sourceTree = "<group>"; };
|
|
1599
|
+
3F5C37472190A686297D3534 /* FBResponseJSONPayloadTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = FBResponseJSONPayloadTests.m; sourceTree = "<group>"; };
|
|
1598
1600
|
717C0D702518ED2800CAA6EC /* TVOSSettings.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = TVOSSettings.xcconfig; sourceTree = "<group>"; };
|
|
1599
1601
|
717C0D862518ED7000CAA6EC /* TVOSTestSettings.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = TVOSTestSettings.xcconfig; sourceTree = "<group>"; };
|
|
1600
1602
|
7183E8C2B556594311CB8898 /* XCUIRemoteSiriInterface-Protocol.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "XCUIRemoteSiriInterface-Protocol.h"; sourceTree = "<group>"; };
|
|
@@ -2682,6 +2684,7 @@
|
|
|
2682
2684
|
712A0C841DA3E459007D02E5 /* FBXPathTests.m */,
|
|
2683
2685
|
EE9B76581CF7987300275851 /* Info.plist */,
|
|
2684
2686
|
716F0DA52A17323300CDD977 /* NSDictionaryFBUtf8SafeTests.m */,
|
|
2687
|
+
3F5C37472190A686297D3534 /* FBResponseJSONPayloadTests.m */,
|
|
2685
2688
|
7139145B1DF01A12005896C2 /* NSExpressionFBFormatTests.m */,
|
|
2686
2689
|
71A224E71DE326C500844D55 /* NSPredicateFBFormatTests.m */,
|
|
2687
2690
|
713914591DF01989005896C2 /* XCUIElementHelpersTests.m */,
|
|
@@ -4811,6 +4814,7 @@
|
|
|
4811
4814
|
71A224E81DE326C500844D55 /* NSPredicateFBFormatTests.m in Sources */,
|
|
4812
4815
|
EE6A892B1D0B25820083E92B /* XCUIApplicationDouble.m in Sources */,
|
|
4813
4816
|
716F0DA62A17323300CDD977 /* NSDictionaryFBUtf8SafeTests.m in Sources */,
|
|
4817
|
+
E82332D32C4E06280CBE3F4C /* FBResponseJSONPayloadTests.m in Sources */,
|
|
4814
4818
|
EE6A892D1D0B2AF40083E92B /* FBErrorBuilderTests.m in Sources */,
|
|
4815
4819
|
712A0C851DA3E459007D02E5 /* FBXPathTests.m in Sources */,
|
|
4816
4820
|
ADBC39981D07842800327304 /* XCUIElementDouble.m in Sources */,
|
|
@@ -59,6 +59,13 @@
|
|
|
59
59
|
ReferencedContainer = "container:WebDriverAgent.xcodeproj">
|
|
60
60
|
</BuildableReference>
|
|
61
61
|
</MacroExpansion>
|
|
62
|
+
<EnvironmentVariables>
|
|
63
|
+
<EnvironmentVariable
|
|
64
|
+
key = "CI"
|
|
65
|
+
value = "$(CI)"
|
|
66
|
+
isEnabled = "YES">
|
|
67
|
+
</EnvironmentVariable>
|
|
68
|
+
</EnvironmentVariables>
|
|
62
69
|
</LaunchAction>
|
|
63
70
|
<ProfileAction
|
|
64
71
|
buildConfiguration = "Release"
|
|
@@ -59,6 +59,13 @@
|
|
|
59
59
|
ReferencedContainer = "container:WebDriverAgent.xcodeproj">
|
|
60
60
|
</BuildableReference>
|
|
61
61
|
</MacroExpansion>
|
|
62
|
+
<EnvironmentVariables>
|
|
63
|
+
<EnvironmentVariable
|
|
64
|
+
key = "CI"
|
|
65
|
+
value = "$(CI)"
|
|
66
|
+
isEnabled = "YES">
|
|
67
|
+
</EnvironmentVariable>
|
|
68
|
+
</EnvironmentVariables>
|
|
62
69
|
</LaunchAction>
|
|
63
70
|
<ProfileAction
|
|
64
71
|
buildConfiguration = "Release"
|
|
@@ -59,6 +59,13 @@
|
|
|
59
59
|
ReferencedContainer = "container:WebDriverAgent.xcodeproj">
|
|
60
60
|
</BuildableReference>
|
|
61
61
|
</MacroExpansion>
|
|
62
|
+
<EnvironmentVariables>
|
|
63
|
+
<EnvironmentVariable
|
|
64
|
+
key = "CI"
|
|
65
|
+
value = "$(CI)"
|
|
66
|
+
isEnabled = "YES">
|
|
67
|
+
</EnvironmentVariable>
|
|
68
|
+
</EnvironmentVariables>
|
|
62
69
|
</LaunchAction>
|
|
63
70
|
<ProfileAction
|
|
64
71
|
buildConfiguration = "Release"
|
|
@@ -59,6 +59,13 @@
|
|
|
59
59
|
ReferencedContainer = "container:WebDriverAgent.xcodeproj">
|
|
60
60
|
</BuildableReference>
|
|
61
61
|
</MacroExpansion>
|
|
62
|
+
<EnvironmentVariables>
|
|
63
|
+
<EnvironmentVariable
|
|
64
|
+
key = "CI"
|
|
65
|
+
value = "$(CI)"
|
|
66
|
+
isEnabled = "YES">
|
|
67
|
+
</EnvironmentVariable>
|
|
68
|
+
</EnvironmentVariables>
|
|
62
69
|
</LaunchAction>
|
|
63
70
|
<ProfileAction
|
|
64
71
|
buildConfiguration = "Release"
|
|
@@ -59,6 +59,13 @@
|
|
|
59
59
|
ReferencedContainer = "container:WebDriverAgent.xcodeproj">
|
|
60
60
|
</BuildableReference>
|
|
61
61
|
</MacroExpansion>
|
|
62
|
+
<EnvironmentVariables>
|
|
63
|
+
<EnvironmentVariable
|
|
64
|
+
key = "CI"
|
|
65
|
+
value = "$(CI)"
|
|
66
|
+
isEnabled = "YES">
|
|
67
|
+
</EnvironmentVariable>
|
|
68
|
+
</EnvironmentVariables>
|
|
62
69
|
</LaunchAction>
|
|
63
70
|
<ProfileAction
|
|
64
71
|
buildConfiguration = "Release"
|
|
@@ -14,32 +14,42 @@ const unichar REPLACER = 0xfffd;
|
|
|
14
14
|
|
|
15
15
|
- (instancetype)fb_utf8SafeStringWithReplacement:(unichar)replacement
|
|
16
16
|
{
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
NSString *
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
17
|
+
// -canBeConvertedToEncoding: and -dataUsingEncoding:allowLossyConversion:
|
|
18
|
+
// both misreport strings containing unpaired UTF-16 surrogates, so the
|
|
19
|
+
// code units are validated manually instead of relying on them.
|
|
20
|
+
NSUInteger length = self.length;
|
|
21
|
+
NSMutableString *result = nil;
|
|
22
|
+
NSString *replacementStr = nil;
|
|
23
|
+
NSUInteger copiedIdx = 0;
|
|
24
|
+
NSUInteger idx = 0;
|
|
25
|
+
while (idx < length) {
|
|
26
|
+
unichar c = [self characterAtIndex:idx];
|
|
27
|
+
if (c >= 0xD800 && c <= 0xDBFF && idx + 1 < length) {
|
|
28
|
+
unichar next = [self characterAtIndex:idx + 1];
|
|
29
|
+
if (next >= 0xDC00 && next <= 0xDFFF) {
|
|
30
|
+
idx += 2;
|
|
31
|
+
continue;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
if (c < 0xD800 || c > 0xDFFF) {
|
|
35
|
+
idx += 1;
|
|
35
36
|
continue;
|
|
36
37
|
}
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
38
|
+
// Unpaired surrogate found. Lazily allocate the result and copy over
|
|
39
|
+
// the valid run preceding it, so strings without any are returned as-is.
|
|
40
|
+
if (nil == result) {
|
|
41
|
+
result = [NSMutableString stringWithCapacity:length];
|
|
42
|
+
replacementStr = [NSString stringWithCharacters:&replacement length:1];
|
|
41
43
|
}
|
|
44
|
+
[result appendString:[self substringWithRange:NSMakeRange(copiedIdx, idx - copiedIdx)]];
|
|
45
|
+
[result appendString:replacementStr];
|
|
46
|
+
idx += 1;
|
|
47
|
+
copiedIdx = idx;
|
|
48
|
+
}
|
|
49
|
+
if (nil == result) {
|
|
50
|
+
return self;
|
|
42
51
|
}
|
|
52
|
+
[result appendString:[self substringWithRange:NSMakeRange(copiedIdx, length - copiedIdx)]];
|
|
43
53
|
return result.copy;
|
|
44
54
|
}
|
|
45
55
|
|
|
@@ -70,16 +80,24 @@ const unichar REPLACER = 0xfffd;
|
|
|
70
80
|
|
|
71
81
|
- (instancetype)fb_utf8SafeDictionary
|
|
72
82
|
{
|
|
73
|
-
NSMutableDictionary *result = [self
|
|
83
|
+
NSMutableDictionary *result = [NSMutableDictionary dictionaryWithCapacity:self.count];
|
|
74
84
|
for (id key in self) {
|
|
75
|
-
id value =
|
|
85
|
+
id value = self[key];
|
|
86
|
+
id safeValue = value;
|
|
76
87
|
if ([value isKindOfClass:NSString.class]) {
|
|
77
|
-
|
|
88
|
+
safeValue = [(NSString *)value fb_utf8SafeStringWithReplacement:REPLACER];
|
|
78
89
|
} else if ([value isKindOfClass:NSArray.class]) {
|
|
79
|
-
|
|
90
|
+
safeValue = [(NSArray *)value fb_utf8SafeArray];
|
|
80
91
|
} else if ([value isKindOfClass:NSDictionary.class]) {
|
|
81
|
-
|
|
92
|
+
safeValue = [(NSDictionary *)value fb_utf8SafeDictionary];
|
|
82
93
|
}
|
|
94
|
+
// Sanitized keys could theoretically collide (e.g. two distinct invalid
|
|
95
|
+
// keys both reducing to the same replacement string); the later one
|
|
96
|
+
// wins, same as any other NSDictionary literal with duplicate keys.
|
|
97
|
+
id safeKey = [key isKindOfClass:NSString.class]
|
|
98
|
+
? [(NSString *)key fb_utf8SafeStringWithReplacement:REPLACER]
|
|
99
|
+
: key;
|
|
100
|
+
result[safeKey] = safeValue;
|
|
83
101
|
}
|
|
84
102
|
return result.copy;
|
|
85
103
|
}
|
|
@@ -134,10 +134,8 @@
|
|
|
134
134
|
- (NSArray<XCUIElement *> *)fb_snapshotDescendantsMatchingChainItems:(NSArray<FBClassChainItem *> *)chainItems shouldReturnAfterFirstMatch:(BOOL)shouldReturnAfterFirstMatch
|
|
135
135
|
{
|
|
136
136
|
NSMutableArray<FBClassChainItem *> *lookupChain = chainItems.mutableCopy;
|
|
137
|
-
//
|
|
138
|
-
|
|
139
|
-
// paying for a fresh one.
|
|
140
|
-
NSArray<id<FBXCElementSnapshot>> *currentRoots = @[self.lastSnapshot ?: self.fb_cachedSnapshot ?: [self fb_customSnapshot]];
|
|
137
|
+
// self.lastSnapshot may be stale leftover from an unrelated earlier command.
|
|
138
|
+
NSArray<id<FBXCElementSnapshot>> *currentRoots = @[self.fb_cachedSnapshot ?: [self fb_customSnapshot]];
|
|
141
139
|
FBClassChainItem *chainItem = lookupChain.firstObject;
|
|
142
140
|
NSArray<id<FBXCElementSnapshot>> *candidates = [self.class fb_snapshotsMatchingItem:chainItem inRoots:currentRoots];
|
|
143
141
|
[lookupChain removeObjectAtIndex:0];
|
|
@@ -100,9 +100,11 @@
|
|
|
100
100
|
}
|
|
101
101
|
}
|
|
102
102
|
NSMutableArray<XCUIElement *> *matchedElements = [NSMutableArray array];
|
|
103
|
-
|
|
103
|
+
// self.lastSnapshot may be stale leftover from an unrelated earlier command.
|
|
104
|
+
id<FBXCElementSnapshot> selfSnapshot = self.fb_cachedSnapshot;
|
|
105
|
+
NSString *uid = nil == selfSnapshot
|
|
104
106
|
? self.fb_uid
|
|
105
|
-
: [FBXCElementSnapshotWrapper wdUIDWithSnapshot:
|
|
107
|
+
: [FBXCElementSnapshotWrapper wdUIDWithSnapshot:selfSnapshot];
|
|
106
108
|
if (nil != uid && [matchedIds containsObject:uid]) {
|
|
107
109
|
XCUIElement *stableSelf = [self fb_stableInstanceWithUid:uid];
|
|
108
110
|
if (1 == snapshots.count) {
|
|
@@ -15,11 +15,11 @@
|
|
|
15
15
|
<key>CFBundlePackageType</key>
|
|
16
16
|
<string>FMWK</string>
|
|
17
17
|
<key>CFBundleShortVersionString</key>
|
|
18
|
-
<string>16.9.
|
|
18
|
+
<string>16.9.2</string>
|
|
19
19
|
<key>CFBundleSignature</key>
|
|
20
20
|
<string>????</string>
|
|
21
21
|
<key>CFBundleVersion</key>
|
|
22
|
-
<string>16.9.
|
|
22
|
+
<string>16.9.2</string>
|
|
23
23
|
<key>NSPrincipalClass</key>
|
|
24
24
|
<string/>
|
|
25
25
|
</dict>
|
|
@@ -43,9 +43,8 @@
|
|
|
43
43
|
NSData *jsonData = [NSJSONSerialization dataWithJSONObject:self.dictionary
|
|
44
44
|
options:NSJSONWritingPrettyPrinted
|
|
45
45
|
error:&error];
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
[FBLogger log:@"The incoming data cannot be encoded to UTF-8 JSON. Applying lossy conversion as a workaround."];
|
|
46
|
+
if (nil == jsonData || nil == [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding]) {
|
|
47
|
+
[FBLogger log:@"JSON serialization failed or produced non-UTF-8 data. Applying lossy conversion as a workaround."];
|
|
49
48
|
jsonData = [NSJSONSerialization dataWithJSONObject:[self.dictionary fb_utf8SafeDictionary]
|
|
50
49
|
options:NSJSONWritingPrettyPrinted
|
|
51
50
|
error:&error];
|
|
@@ -81,8 +81,9 @@
|
|
|
81
81
|
|
|
82
82
|
NSInteger FBTestmanagerdVersion(void)
|
|
83
83
|
{
|
|
84
|
-
//
|
|
85
|
-
//
|
|
84
|
+
// -1 means "not yet determined". The timeout fallback is cached like any other outcome: the
|
|
85
|
+
// value is diagnostic-only, and retrying would stall every later /status for the full timeout
|
|
86
|
+
// against a daemon that never answers.
|
|
86
87
|
static NSInteger cachedVersion = -1;
|
|
87
88
|
static dispatch_queue_t syncQueue;
|
|
88
89
|
static dispatch_once_t onceToken;
|
|
@@ -108,12 +109,11 @@ NSInteger FBTestmanagerdVersion(void)
|
|
|
108
109
|
}];
|
|
109
110
|
int64_t timeoutNs = (int64_t)(TESTMANAGERD_VERSION_TIMEOUT_SEC * NSEC_PER_SEC);
|
|
110
111
|
if (0 != dispatch_semaphore_wait(sem, dispatch_time(DISPATCH_TIME_NOW, timeoutNs))) {
|
|
111
|
-
// Assume newest/full-featured on timeout, but don't cache it - retry on the next call.
|
|
112
112
|
[FBLogger logFmt:@"Did not receive a testmanagerd protocol version reply within %d seconds; assuming the newest/full-featured protocol", TESTMANAGERD_VERSION_TIMEOUT_SEC];
|
|
113
113
|
result = 0xFFFF;
|
|
114
|
-
|
|
114
|
+
} else {
|
|
115
|
+
result = receivedVersion;
|
|
115
116
|
}
|
|
116
|
-
result = receivedVersion;
|
|
117
117
|
} else {
|
|
118
118
|
// Modern testmanagerd (Xcode 15+) negotiates named XCTCapabilities instead of a scalar
|
|
119
119
|
// version; there's no direct integer equivalent, so just confirm capabilities negotiated.
|
|
@@ -258,10 +258,11 @@ static NSString *const topNodeIndexPath = @"top";
|
|
|
258
258
|
if ([root isKindOfClass:XCUIElement.class]) {
|
|
259
259
|
lookupScopeSnapshot = [self snapshotWithRoot:[(XCUIElement *)root application]
|
|
260
260
|
useNative:useNativeSnapshot];
|
|
261
|
+
// root.lastSnapshot may be stale leftover from an unrelated earlier command.
|
|
261
262
|
contextRootSnapshot = [root isKindOfClass:XCUIApplication.class]
|
|
262
263
|
? nil
|
|
263
|
-
: ([(XCUIElement *)root
|
|
264
|
-
|
|
264
|
+
: ([(XCUIElement *)root fb_cachedSnapshot] ?: [self snapshotWithRoot:(XCUIElement *)root
|
|
265
|
+
useNative:useNativeSnapshot]);
|
|
265
266
|
} else {
|
|
266
267
|
lookupScopeSnapshot = (id<FBXCElementSnapshot>)root;
|
|
267
268
|
contextRootSnapshot = nil == lookupScopeSnapshot.parent ? nil : (id<FBXCElementSnapshot>)root;
|
|
@@ -44,9 +44,12 @@
|
|
|
44
44
|
[super tearDown];
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
-
|
|
48
|
-
- (void)disabled_testAutoAcceptingOfAlerts
|
|
47
|
+
- (void)testAutoAcceptingOfAlerts
|
|
49
48
|
{
|
|
49
|
+
if (FBIntegrationTestCase.isRunningInCI) {
|
|
50
|
+
XCTSkip(@"Flaky on slow CI machines");
|
|
51
|
+
}
|
|
52
|
+
|
|
50
53
|
self.session = [FBSession
|
|
51
54
|
initWithApplication:XCUIApplication.fb_activeApplication
|
|
52
55
|
defaultAlertAction:@"accept"];
|
|
@@ -57,9 +60,12 @@
|
|
|
57
60
|
}
|
|
58
61
|
}
|
|
59
62
|
|
|
60
|
-
|
|
61
|
-
- (void)disabled_testAutoDismissingOfAlerts
|
|
63
|
+
- (void)testAutoDismissingOfAlerts
|
|
62
64
|
{
|
|
65
|
+
if (FBIntegrationTestCase.isRunningInCI) {
|
|
66
|
+
XCTSkip(@"Flaky on slow CI machines");
|
|
67
|
+
}
|
|
68
|
+
|
|
63
69
|
self.session = [FBSession
|
|
64
70
|
initWithApplication:XCUIApplication.fb_activeApplication
|
|
65
71
|
defaultAlertAction:@"dismiss"];
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
|
|
41
41
|
- (void)testAccessibilityDeadlineAbortsSnapshotRequestForDeadlockedApp
|
|
42
42
|
{
|
|
43
|
-
if (
|
|
43
|
+
if (FBIntegrationTestCase.isRunningInCI) {
|
|
44
44
|
XCTSkip(@"Deliberately freezes the app for several seconds, too slow/flaky for CI");
|
|
45
45
|
}
|
|
46
46
|
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
// Images are neither accessibility elements nor contain them, so both checks should fail
|
|
67
67
|
XCUIElement *imageElement = self.testedApplication.images.allElementsBoundByIndex.firstObject;
|
|
68
68
|
if (nil == imageElement) {
|
|
69
|
-
|
|
69
|
+
XCTSkip(@"No image element available to test");
|
|
70
70
|
}
|
|
71
71
|
|
|
72
72
|
XCTAssertTrue(imageElement.exists);
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
- (void)testSpringBoardIcons
|
|
23
23
|
{
|
|
24
24
|
if ([UIDevice currentDevice].userInterfaceIdiom == UIUserInterfaceIdiomPad) {
|
|
25
|
-
|
|
25
|
+
XCTSkip(@"Not applicable to iPad");
|
|
26
26
|
}
|
|
27
27
|
[self launchApplication];
|
|
28
28
|
[self goToSpringBoardFirstPage];
|
|
@@ -37,21 +37,14 @@
|
|
|
37
37
|
XCTAssertFalse(self.springboard.icons[@"IntegrationApp"].firstMatch.fb_isVisible);
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
-
- (void)
|
|
40
|
+
- (void)testIconsFromSearchDashboard
|
|
41
41
|
{
|
|
42
|
-
if (
|
|
43
|
-
|
|
44
|
-
|
|
42
|
+
if (FBIntegrationTestCase.isRunningInCI) {
|
|
43
|
+
// Causes: Failure fetching attributes for element <XCAccessibilityElement>
|
|
44
|
+
// Device element: Error Domain=XCTDaemonErrorDomain Code=13 "Value for attribute 5017 is an error."
|
|
45
|
+
XCTSkip(@"Fails with XCTDaemonErrorDomain Code=13 on CI simulators");
|
|
45
46
|
}
|
|
46
|
-
[self launchApplication];
|
|
47
|
-
[self goToSpringBoardExtras];
|
|
48
|
-
XCTAssertFalse(self.springboard.icons[@"Extras"].otherElements[@"Contacts"].fb_isVisible);
|
|
49
|
-
}
|
|
50
47
|
|
|
51
|
-
- (void)disabled_testIconsFromSearchDashboard
|
|
52
|
-
{
|
|
53
|
-
// This test causes:
|
|
54
|
-
// Failure fetching attributes for element <XCAccessibilityElement: 0x60800044dd10> Device element: Error Domain=XCTDaemonErrorDomain Code=13 "Value for attribute 5017 is an error." UserInfo={NSLocalizedDescription=Value for attribute 5017 is an error.}
|
|
55
48
|
[self launchApplication];
|
|
56
49
|
[self goToSpringBoardDashboard];
|
|
57
50
|
XCTAssertFalse(self.springboard.icons[@"Reminders"].fb_isVisible);
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
@"FIXME: Unstable on platform version 27.");
|
|
62
62
|
|
|
63
63
|
if (![XCUIDevice sharedDevice].supportsPressureInteraction) {
|
|
64
|
-
|
|
64
|
+
XCTSkip(@"Device does not support pressure interaction");
|
|
65
65
|
}
|
|
66
66
|
|
|
67
67
|
[self verifyForceTapWithOrientation:UIDeviceOrientationPortrait];
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
- (void)testForceTapInLandscapeLeft
|
|
71
71
|
{
|
|
72
72
|
if (![XCUIDevice sharedDevice].supportsPressureInteraction) {
|
|
73
|
-
|
|
73
|
+
XCTSkip(@"Device does not support pressure interaction");
|
|
74
74
|
}
|
|
75
75
|
|
|
76
76
|
[self verifyForceTapWithOrientation:UIDeviceOrientationLandscapeLeft];
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
- (void)testForceTapInLandscapeRight
|
|
80
80
|
{
|
|
81
81
|
if (![XCUIDevice sharedDevice].supportsPressureInteraction) {
|
|
82
|
-
|
|
82
|
+
XCTSkip(@"Device does not support pressure interaction");
|
|
83
83
|
}
|
|
84
84
|
|
|
85
85
|
[self verifyForceTapWithOrientation:UIDeviceOrientationLandscapeRight];
|
|
@@ -28,6 +28,13 @@ extern NSArray<NSString *> *const FBMainViewButtonLabels;
|
|
|
28
28
|
@property (nonatomic, strong, readonly) XCUIApplication *testedApplication;
|
|
29
29
|
@property (nonatomic, strong, readonly) XCUIApplication *springboard;
|
|
30
30
|
|
|
31
|
+
/**
|
|
32
|
+
Whether tests are running under CI, as forwarded into the test process by the
|
|
33
|
+
scheme's CI environment variable (see Fastlane/Fastfile). Use to XCTSkip tests
|
|
34
|
+
that are known to be too slow/flaky/unsupported for CI.
|
|
35
|
+
*/
|
|
36
|
+
+ (BOOL)isRunningInCI;
|
|
37
|
+
|
|
31
38
|
/**
|
|
32
39
|
Launches application and resets side effects of testing like orientation etc.
|
|
33
40
|
*/
|
|
@@ -53,11 +60,6 @@ extern NSArray<NSString *> *const FBMainViewButtonLabels;
|
|
|
53
60
|
*/
|
|
54
61
|
- (void)goToSpringBoardFirstPage;
|
|
55
62
|
|
|
56
|
-
/**
|
|
57
|
-
Navigates to SpringBoard path with Extras folder
|
|
58
|
-
*/
|
|
59
|
-
- (void)goToSpringBoardExtras;
|
|
60
|
-
|
|
61
63
|
/**
|
|
62
64
|
Navigates to SpringBoard's dashboard
|
|
63
65
|
*/
|
|
@@ -43,6 +43,12 @@ NSArray<NSString *> *const FBMainViewButtonLabels = @[
|
|
|
43
43
|
|
|
44
44
|
@implementation FBIntegrationTestCase
|
|
45
45
|
|
|
46
|
+
+ (BOOL)isRunningInCI
|
|
47
|
+
{
|
|
48
|
+
NSString *value = NSProcessInfo.processInfo.environment[@"CI"];
|
|
49
|
+
return nil != value && value.length > 0;
|
|
50
|
+
}
|
|
51
|
+
|
|
46
52
|
- (void)setUp
|
|
47
53
|
{
|
|
48
54
|
// Enable it to get extended XCTest logs printed into the console
|
|
@@ -105,14 +111,6 @@ NSArray<NSString *> *const FBMainViewButtonLabels = @[
|
|
|
105
111
|
FBAssertWaitTillBecomesTrue(XCUIApplication.fb_systemApplication.icons[@"Calendar"].firstMatch.fb_isVisible);
|
|
106
112
|
}
|
|
107
113
|
|
|
108
|
-
- (void)goToSpringBoardExtras
|
|
109
|
-
{
|
|
110
|
-
[self goToSpringBoardFirstPage];
|
|
111
|
-
[self.springboard swipeLeft];
|
|
112
|
-
[self.testedApplication fb_waitUntilStable];
|
|
113
|
-
FBAssertWaitTillBecomesTrue(self.springboard.icons[@"Extras"].fb_isVisible);
|
|
114
|
-
}
|
|
115
|
-
|
|
116
114
|
- (void)goToSpringBoardDashboard
|
|
117
115
|
{
|
|
118
116
|
[self goToSpringBoardFirstPage];
|
|
@@ -42,8 +42,12 @@
|
|
|
42
42
|
[self.session terminateApplicationWithBundleId:FB_SAFARI_BUNDLE_ID];
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
-
- (void)
|
|
45
|
+
- (void)testCanHandleSafariInputPrompt
|
|
46
46
|
{
|
|
47
|
+
if (FBIntegrationTestCase.isRunningInCI) {
|
|
48
|
+
XCTSkip(@"Depends on an external website (w3schools.com), unreliable on CI");
|
|
49
|
+
}
|
|
50
|
+
|
|
47
51
|
XCUIElement *urlInput = [[self.safariApp
|
|
48
52
|
descendantsMatchingType:XCUIElementTypeTextField]
|
|
49
53
|
matchingPredicate:[
|
|
@@ -52,8 +52,7 @@
|
|
|
52
52
|
- (void)testSimpleScroll
|
|
53
53
|
{
|
|
54
54
|
if (SYSTEM_VERSION_LESS_THAN(@"16.0")) {
|
|
55
|
-
|
|
56
|
-
return;
|
|
55
|
+
XCTSkip(@"Requires iOS 16.0+");
|
|
57
56
|
}
|
|
58
57
|
|
|
59
58
|
FBAssertVisibleCell(@"0");
|
|
@@ -90,8 +89,7 @@
|
|
|
90
89
|
- (void)testNativeFarScrollToVisible
|
|
91
90
|
{
|
|
92
91
|
if (SYSTEM_VERSION_LESS_THAN(@"16.0")) {
|
|
93
|
-
|
|
94
|
-
return;
|
|
92
|
+
XCTSkip(@"Requires iOS 16.0+");
|
|
95
93
|
}
|
|
96
94
|
|
|
97
95
|
NSString *cellName = @"80";
|
|
@@ -114,8 +112,7 @@
|
|
|
114
112
|
XCTAssertTrue(element.fb_isVisible);
|
|
115
113
|
|
|
116
114
|
if (SYSTEM_VERSION_LESS_THAN(@"16.0")) {
|
|
117
|
-
|
|
118
|
-
return;
|
|
115
|
+
XCTSkip(@"Requires iOS 16.0+");
|
|
119
116
|
}
|
|
120
117
|
|
|
121
118
|
[element tap];
|
|
@@ -32,9 +32,8 @@
|
|
|
32
32
|
{
|
|
33
33
|
XCTSkip(@"Failed on Azure Pipeline. Local run succeeded.");
|
|
34
34
|
|
|
35
|
-
// Video recording is only available since iOS 17
|
|
36
35
|
if (SYSTEM_VERSION_LESS_THAN(@"17.0")) {
|
|
37
|
-
|
|
36
|
+
XCTSkip(@"Video recording is only available since iOS 17");
|
|
38
37
|
}
|
|
39
38
|
|
|
40
39
|
FBScreenRecordingRequest *recordingRequest = [[FBScreenRecordingRequest alloc] initWithFps:24
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
- (void)testVoiceOverUnavailableOnOlderSDK
|
|
33
33
|
{
|
|
34
34
|
if ([XCUIDevice.sharedDevice fb_isVoiceOverServiceAvailable]) {
|
|
35
|
-
|
|
35
|
+
XCTSkip(@"Only applicable when the VoiceOver service is unavailable");
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
NSError *error = nil;
|
|
@@ -44,10 +44,10 @@
|
|
|
44
44
|
- (void)testVoiceOverEnableDisableAndNavigation
|
|
45
45
|
{
|
|
46
46
|
if (SYSTEM_VERSION_LESS_THAN(@"27.0")) {
|
|
47
|
-
|
|
47
|
+
XCTSkip(@"Requires iOS 27.0+");
|
|
48
48
|
}
|
|
49
49
|
if (![XCUIDevice.sharedDevice fb_isVoiceOverServiceAvailable]) {
|
|
50
|
-
|
|
50
|
+
XCTSkip(@"VoiceOver service is unavailable on this device");
|
|
51
51
|
}
|
|
52
52
|
|
|
53
53
|
[self launchApplication];
|
|
@@ -78,10 +78,10 @@
|
|
|
78
78
|
- (void)testVoiceOverMoveBackward
|
|
79
79
|
{
|
|
80
80
|
if (SYSTEM_VERSION_LESS_THAN(@"27.0")) {
|
|
81
|
-
|
|
81
|
+
XCTSkip(@"Requires iOS 27.0+");
|
|
82
82
|
}
|
|
83
83
|
if (![XCUIDevice.sharedDevice fb_isVoiceOverServiceAvailable]) {
|
|
84
|
-
|
|
84
|
+
XCTSkip(@"VoiceOver service is unavailable on this device");
|
|
85
85
|
}
|
|
86
86
|
|
|
87
87
|
[self launchApplication];
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
- (void)testErroneousGestures
|
|
33
33
|
{
|
|
34
34
|
if (![XCPointerEvent.class fb_areKeyEventsSupported]) {
|
|
35
|
-
|
|
35
|
+
XCTSkip(@"Key events are not supported on this platform");
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
NSArray<NSArray<NSDictionary<NSString *, id> *> *> *invalidGestures =
|
|
@@ -121,7 +121,7 @@
|
|
|
121
121
|
- (void)testTextTyping
|
|
122
122
|
{
|
|
123
123
|
if (![XCPointerEvent.class fb_areKeyEventsSupported]) {
|
|
124
|
-
|
|
124
|
+
XCTSkip(@"Key events are not supported on this platform");
|
|
125
125
|
}
|
|
126
126
|
|
|
127
127
|
XCUIElement *textField = self.testedApplication.textFields[@"aIdentifier"];
|
|
@@ -160,7 +160,7 @@
|
|
|
160
160
|
- (void)testTextTypingWithEmptyActions
|
|
161
161
|
{
|
|
162
162
|
if (![XCPointerEvent.class fb_areKeyEventsSupported]) {
|
|
163
|
-
|
|
163
|
+
XCTSkip(@"Key events are not supported on this platform");
|
|
164
164
|
}
|
|
165
165
|
|
|
166
166
|
XCUIElement *textField = self.testedApplication.textFields[@"aIdentifier"];
|
|
@@ -90,7 +90,7 @@
|
|
|
90
90
|
{
|
|
91
91
|
NSString *adderss = [XCUIDevice sharedDevice].fb_wifiIPAddress;
|
|
92
92
|
if (!adderss) {
|
|
93
|
-
|
|
93
|
+
XCTSkip(@"No WiFi IP address available on this device");
|
|
94
94
|
}
|
|
95
95
|
NSRange range = [adderss rangeOfString:@"^([0-9]{1,3})\\.([0-9]{1,3})\\.([0-9]{1,3})\\.([0-9]{1,3})" options:NSRegularExpressionSearch];
|
|
96
96
|
XCTAssertTrue(range.location != NSNotFound);
|
|
@@ -119,7 +119,7 @@
|
|
|
119
119
|
- (void)testUrlSchemeActivation
|
|
120
120
|
{
|
|
121
121
|
if (SYSTEM_VERSION_LESS_THAN(@"16.4")) {
|
|
122
|
-
|
|
122
|
+
XCTSkip(@"Requires iOS 16.4+");
|
|
123
123
|
}
|
|
124
124
|
|
|
125
125
|
NSError *error;
|
|
@@ -131,7 +131,7 @@
|
|
|
131
131
|
- (void)testUrlSchemeActivationWithApp
|
|
132
132
|
{
|
|
133
133
|
if (SYSTEM_VERSION_LESS_THAN(@"16.4")) {
|
|
134
|
-
|
|
134
|
+
XCTSkip(@"Requires iOS 16.4+");
|
|
135
135
|
}
|
|
136
136
|
|
|
137
137
|
NSError *error;
|
|
@@ -146,7 +146,7 @@
|
|
|
146
146
|
- (void)testSimulatedLocationSetup
|
|
147
147
|
{
|
|
148
148
|
if (SYSTEM_VERSION_LESS_THAN(@"16.4")) {
|
|
149
|
-
|
|
149
|
+
XCTSkip(@"Requires iOS 16.4+");
|
|
150
150
|
}
|
|
151
151
|
|
|
152
152
|
CLLocation *simulatedLocation = [[CLLocation alloc] initWithLatitude:50 longitude:50];
|
|
@@ -226,7 +226,7 @@
|
|
|
226
226
|
- (void)testAppearance
|
|
227
227
|
{
|
|
228
228
|
if (SYSTEM_VERSION_LESS_THAN(@"15.0")) {
|
|
229
|
-
|
|
229
|
+
XCTSkip(@"Requires iOS 15.0+");
|
|
230
230
|
}
|
|
231
231
|
NSError *error;
|
|
232
232
|
XCTAssertTrue([XCUIDevice.sharedDevice fb_setAppearance:FBUIInterfaceAppearanceDark error:&error]);
|
|
@@ -21,6 +21,7 @@
|
|
|
21
21
|
#import "XCUIElement+FBResolve.h"
|
|
22
22
|
#import "FBXPath.h"
|
|
23
23
|
#import "FBXCodeCompatibility.h"
|
|
24
|
+
#import "XCUIElement+FBUtilities.h"
|
|
24
25
|
|
|
25
26
|
@interface XCUIElementFBFindTests : FBIntegrationTestCase
|
|
26
27
|
@property (nonatomic, strong) XCUIElement *testedView;
|
|
@@ -536,3 +537,24 @@
|
|
|
536
537
|
}
|
|
537
538
|
|
|
538
539
|
@end
|
|
540
|
+
|
|
541
|
+
@interface XCUIElementFBFindTests_StaleAppSnapshot : FBIntegrationTestCase
|
|
542
|
+
@end
|
|
543
|
+
@implementation XCUIElementFBFindTests_StaleAppSnapshot
|
|
544
|
+
|
|
545
|
+
// Regression test for https://github.com/appium/appium/issues/22672.
|
|
546
|
+
- (void)testClassChainWithIntermediatePositionAfterStaleAppSnapshot
|
|
547
|
+
{
|
|
548
|
+
[self launchApplication];
|
|
549
|
+
// Simulates a stale snapshot cached by an earlier, unrelated command (e.g. GET /source).
|
|
550
|
+
[self.testedApplication fb_customSnapshot];
|
|
551
|
+
[self goToDeepHierarchyPage];
|
|
552
|
+
|
|
553
|
+
NSString *query = @"**/XCUIElementTypeOther[`label == \"View 10\"`][1]/**/XCUIElementTypeOther[`label BEGINSWITH \"View 19\"`]";
|
|
554
|
+
NSArray<XCUIElement *> *matches = [self.testedApplication fb_descendantsMatchingClassChain:query
|
|
555
|
+
shouldReturnAfterFirstMatch:NO];
|
|
556
|
+
XCTAssertEqual(matches.count, 1);
|
|
557
|
+
XCTAssertEqualObjects(matches.firstObject.label, @"View 19");
|
|
558
|
+
}
|
|
559
|
+
|
|
560
|
+
@end
|
|
@@ -0,0 +1,76 @@
|
|
|
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 "FBResponseJSONPayload.h"
|
|
12
|
+
#import "RouteResponse.h"
|
|
13
|
+
|
|
14
|
+
@interface FBResponseJSONPayloadTests : XCTestCase
|
|
15
|
+
@end
|
|
16
|
+
|
|
17
|
+
@implementation FBResponseJSONPayloadTests
|
|
18
|
+
|
|
19
|
+
// https://github.com/appium/appium/issues/22673
|
|
20
|
+
- (void)testDispatchSanitizesNonUtf8EncodableStrings
|
|
21
|
+
{
|
|
22
|
+
unichar chars[] = {'a', 'b', 'c', 0xD800, 'd', 'e', 'f'};
|
|
23
|
+
NSString *unsafe = [NSString stringWithCharacters:chars length:sizeof(chars) / sizeof(unichar)];
|
|
24
|
+
NSDictionary *dictionary = @{@"value": unsafe};
|
|
25
|
+
FBResponseJSONPayload *payload = [[FBResponseJSONPayload alloc] initWithDictionary:dictionary
|
|
26
|
+
httpStatusCode:kHTTPStatusCodeOK];
|
|
27
|
+
RouteResponse *response = [RouteResponse new];
|
|
28
|
+
|
|
29
|
+
XCTAssertNoThrow([payload dispatchWithResponse:response]);
|
|
30
|
+
XCTAssertNotNil(response.responseData);
|
|
31
|
+
|
|
32
|
+
NSError *error = nil;
|
|
33
|
+
NSDictionary *parsed = [NSJSONSerialization JSONObjectWithData:response.responseData
|
|
34
|
+
options:0
|
|
35
|
+
error:&error];
|
|
36
|
+
XCTAssertNil(error);
|
|
37
|
+
XCTAssertEqualObjects(parsed[@"value"], @"abc�def");
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
// Dictionary keys must be sanitized too, not just values
|
|
41
|
+
- (void)testDispatchSanitizesNonUtf8EncodableKeys
|
|
42
|
+
{
|
|
43
|
+
unichar chars[] = {'k', 0xD800, 'y'};
|
|
44
|
+
NSString *unsafeKey = [NSString stringWithCharacters:chars length:sizeof(chars) / sizeof(unichar)];
|
|
45
|
+
NSDictionary *dictionary = @{unsafeKey: @"value"};
|
|
46
|
+
FBResponseJSONPayload *payload = [[FBResponseJSONPayload alloc] initWithDictionary:dictionary
|
|
47
|
+
httpStatusCode:kHTTPStatusCodeOK];
|
|
48
|
+
RouteResponse *response = [RouteResponse new];
|
|
49
|
+
|
|
50
|
+
XCTAssertNoThrow([payload dispatchWithResponse:response]);
|
|
51
|
+
XCTAssertNotNil(response.responseData);
|
|
52
|
+
|
|
53
|
+
NSError *error = nil;
|
|
54
|
+
NSDictionary *parsed = [NSJSONSerialization JSONObjectWithData:response.responseData
|
|
55
|
+
options:0
|
|
56
|
+
error:&error];
|
|
57
|
+
XCTAssertNil(error);
|
|
58
|
+
XCTAssertEqualObjects(parsed[@"k�y"], @"value");
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
- (void)testDispatchWithRegularDictionary
|
|
62
|
+
{
|
|
63
|
+
NSDictionary *dictionary = @{@"value": @"regular string"};
|
|
64
|
+
FBResponseJSONPayload *payload = [[FBResponseJSONPayload alloc] initWithDictionary:dictionary
|
|
65
|
+
httpStatusCode:kHTTPStatusCodeOK];
|
|
66
|
+
RouteResponse *response = [RouteResponse new];
|
|
67
|
+
|
|
68
|
+
[payload dispatchWithResponse:response];
|
|
69
|
+
|
|
70
|
+
NSDictionary *parsed = [NSJSONSerialization JSONObjectWithData:response.responseData
|
|
71
|
+
options:0
|
|
72
|
+
error:nil];
|
|
73
|
+
XCTAssertEqualObjects(parsed, dictionary);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
@end
|
|
@@ -31,4 +31,47 @@
|
|
|
31
31
|
XCTAssertEqualObjects(d, d.fb_utf8SafeDictionary);
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
+
- (void)testUnpairedSurrogateSanitization
|
|
35
|
+
{
|
|
36
|
+
unichar chars[] = {'a', 'b', 'c', 0xD800, 'd', 'e', 'f'};
|
|
37
|
+
NSString *unsafe = [NSString stringWithCharacters:chars length:sizeof(chars) / sizeof(unichar)];
|
|
38
|
+
NSDictionary *d = @{
|
|
39
|
+
@"key": unsafe,
|
|
40
|
+
@"nested": @{@"value": @[unsafe]},
|
|
41
|
+
};
|
|
42
|
+
NSDictionary *safe = d.fb_utf8SafeDictionary;
|
|
43
|
+
|
|
44
|
+
NSString *expected = @"abc�def";
|
|
45
|
+
XCTAssertEqualObjects(safe[@"key"], expected);
|
|
46
|
+
XCTAssertEqualObjects(safe[@"nested"][@"value"][0], expected);
|
|
47
|
+
|
|
48
|
+
NSError *error = nil;
|
|
49
|
+
NSData *jsonData = [NSJSONSerialization dataWithJSONObject:safe
|
|
50
|
+
options:0
|
|
51
|
+
error:&error];
|
|
52
|
+
XCTAssertNotNil(jsonData, @"JSON serialization of the sanitized dictionary unexpectedly failed: %@", error);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
- (void)testUnpairedSurrogateKeySanitization
|
|
56
|
+
{
|
|
57
|
+
unichar chars[] = {'k', 0xD800, 'y'};
|
|
58
|
+
NSString *unsafeKey = [NSString stringWithCharacters:chars length:sizeof(chars) / sizeof(unichar)];
|
|
59
|
+
NSDictionary *d = @{unsafeKey: @"value"};
|
|
60
|
+
NSDictionary *safe = d.fb_utf8SafeDictionary;
|
|
61
|
+
|
|
62
|
+
XCTAssertEqualObjects(safe[@"k�y"], @"value");
|
|
63
|
+
|
|
64
|
+
NSError *error = nil;
|
|
65
|
+
NSData *jsonData = [NSJSONSerialization dataWithJSONObject:safe
|
|
66
|
+
options:0
|
|
67
|
+
error:&error];
|
|
68
|
+
XCTAssertNotNil(jsonData, @"JSON serialization of the sanitized dictionary unexpectedly failed: %@", error);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
- (void)testValidSurrogatePairIsPreserved
|
|
72
|
+
{
|
|
73
|
+
NSString *emoji = @"a😀b";
|
|
74
|
+
XCTAssertEqualObjects([emoji fb_utf8SafeStringWithReplacement:0xfffd], emoji);
|
|
75
|
+
}
|
|
76
|
+
|
|
34
77
|
@end
|
package/build/lib/types.d.ts
CHANGED
|
@@ -11,6 +11,16 @@ export interface WDASettings {
|
|
|
11
11
|
keyboardAutocorrection?: boolean;
|
|
12
12
|
keyboardPrediction?: boolean;
|
|
13
13
|
customSnapshotTimeout?: number;
|
|
14
|
+
accessibilityDeadline?: number;
|
|
15
|
+
enforceCustomSnapshots?: boolean;
|
|
16
|
+
limitXPathContextScope?: boolean;
|
|
17
|
+
includeHittableInPageSource?: boolean;
|
|
18
|
+
includeNativeFrameInPageSource?: boolean;
|
|
19
|
+
includeNativeAccessibilityElementInPageSource?: boolean;
|
|
20
|
+
includeMinMaxValueInPageSource?: boolean;
|
|
21
|
+
includeCustomActionsInPageSource?: boolean;
|
|
22
|
+
respectSystemAlerts?: boolean;
|
|
23
|
+
autoClickAlertSelector?: string;
|
|
14
24
|
snapshotMaxDepth?: number;
|
|
15
25
|
snapshotMaxChildren?: number;
|
|
16
26
|
useFirstMatch?: boolean;
|
|
@@ -46,6 +56,7 @@ export interface WDACapabilities {
|
|
|
46
56
|
forceSimulatorSoftwareKeyboardPresence?: boolean;
|
|
47
57
|
defaultAlertAction?: 'accept' | 'dismiss';
|
|
48
58
|
appLaunchStateTimeoutSec?: number;
|
|
59
|
+
accessibilityDeadline?: number;
|
|
49
60
|
}
|
|
50
61
|
export interface WebDriverAgentArgs {
|
|
51
62
|
device: AppleDevice;
|
package/build/lib/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../lib/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,WAAW,EAAC,MAAM,eAAe,CAAC;AAG/C,MAAM,WAAW,WAAW;IAC1B,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAClC,yBAAyB,CAAC,EAAE,OAAO,CAAC;IACpC,4BAA4B,CAAC,EAAE,MAAM,CAAC;IACtC,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,yBAAyB,CAAC,EAAE,MAAM,CAAC;IACnC,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,oBAAoB,CAAC,EAA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IAC9C,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,mBAAmB,CAAC,EAAE,WAAW,CAAC;CACnC"}
|
package/lib/types.ts
CHANGED
|
@@ -13,6 +13,16 @@ export interface WDASettings {
|
|
|
13
13
|
keyboardAutocorrection?: boolean;
|
|
14
14
|
keyboardPrediction?: boolean;
|
|
15
15
|
customSnapshotTimeout?: number;
|
|
16
|
+
accessibilityDeadline?: number;
|
|
17
|
+
enforceCustomSnapshots?: boolean;
|
|
18
|
+
limitXPathContextScope?: boolean;
|
|
19
|
+
includeHittableInPageSource?: boolean;
|
|
20
|
+
includeNativeFrameInPageSource?: boolean;
|
|
21
|
+
includeNativeAccessibilityElementInPageSource?: boolean;
|
|
22
|
+
includeMinMaxValueInPageSource?: boolean;
|
|
23
|
+
includeCustomActionsInPageSource?: boolean;
|
|
24
|
+
respectSystemAlerts?: boolean;
|
|
25
|
+
autoClickAlertSelector?: string;
|
|
16
26
|
snapshotMaxDepth?: number;
|
|
17
27
|
snapshotMaxChildren?: number;
|
|
18
28
|
useFirstMatch?: boolean;
|
|
@@ -50,6 +60,7 @@ export interface WDACapabilities {
|
|
|
50
60
|
forceSimulatorSoftwareKeyboardPresence?: boolean;
|
|
51
61
|
defaultAlertAction?: 'accept' | 'dismiss';
|
|
52
62
|
appLaunchStateTimeoutSec?: number;
|
|
63
|
+
accessibilityDeadline?: number;
|
|
53
64
|
}
|
|
54
65
|
|
|
55
66
|
export interface WebDriverAgentArgs {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "appium-webdriveragent",
|
|
3
|
-
"version": "16.9.
|
|
3
|
+
"version": "16.9.2",
|
|
4
4
|
"description": "Package bundling WebDriverAgent",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Appium",
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
},
|
|
66
66
|
"dependencies": {
|
|
67
67
|
"@appium/base-driver": "^10.3.0",
|
|
68
|
-
"@appium/strongbox": "^
|
|
68
|
+
"@appium/strongbox": "^2.0.0",
|
|
69
69
|
"@appium/support": "^7.2.1",
|
|
70
70
|
"appium-ios-simulator": "^9.0.0",
|
|
71
71
|
"async-lock": "^1.0.0",
|