appium-webdriveragent 9.11.0 → 9.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/WebDriverAgentLib/Info.plist +2 -2
- package/WebDriverAgentLib/Utilities/FBXPath.m +19 -0
- package/WebDriverAgentTests/IntegrationTests/FBXPathIntegrationTests.m +3 -3
- package/WebDriverAgentTests/UnitTests/Doubles/XCElementSnapshotDouble.h +1 -0
- package/WebDriverAgentTests/UnitTests/Doubles/XCElementSnapshotDouble.m +4 -0
- package/WebDriverAgentTests/UnitTests/FBXPathTests.m +6 -5
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
## [9.12.0](https://github.com/appium/WebDriverAgent/compare/v9.11.0...v9.12.0) (2025-06-04)
|
|
2
|
+
|
|
3
|
+
### Features
|
|
4
|
+
|
|
5
|
+
* add accessibility traits to XML page source ([#1028](https://github.com/appium/WebDriverAgent/issues/1028)) ([2df6649](https://github.com/appium/WebDriverAgent/commit/2df6649cb532d65a8c14633591b76c90185644cb))
|
|
6
|
+
|
|
1
7
|
## [9.11.0](https://github.com/appium/WebDriverAgent/compare/v9.10.1...v9.11.0) (2025-06-03)
|
|
2
8
|
|
|
3
9
|
### Features
|
|
@@ -15,11 +15,11 @@
|
|
|
15
15
|
<key>CFBundlePackageType</key>
|
|
16
16
|
<string>FMWK</string>
|
|
17
17
|
<key>CFBundleShortVersionString</key>
|
|
18
|
-
<string>9.
|
|
18
|
+
<string>9.12.0</string>
|
|
19
19
|
<key>CFBundleSignature</key>
|
|
20
20
|
<string>????</string>
|
|
21
21
|
<key>CFBundleVersion</key>
|
|
22
|
-
<string>9.
|
|
22
|
+
<string>9.12.0</string>
|
|
23
23
|
<key>NSPrincipalClass</key>
|
|
24
24
|
<string/>
|
|
25
25
|
</dict>
|
|
@@ -105,6 +105,10 @@
|
|
|
105
105
|
|
|
106
106
|
@end
|
|
107
107
|
|
|
108
|
+
@interface FBTraitsAttribute : FBElementAttribute
|
|
109
|
+
|
|
110
|
+
@end
|
|
111
|
+
|
|
108
112
|
#if TARGET_OS_TV
|
|
109
113
|
|
|
110
114
|
@interface FBFocusedAttribute : FBElementAttribute
|
|
@@ -583,6 +587,7 @@ static NSString *const FBAbstractMethodInvocationException = @"AbstractMethodInv
|
|
|
583
587
|
FBIndexAttribute.class,
|
|
584
588
|
FBHittableAttribute.class,
|
|
585
589
|
FBPlaceholderValueAttribute.class,
|
|
590
|
+
FBTraitsAttribute.class,
|
|
586
591
|
];
|
|
587
592
|
}
|
|
588
593
|
|
|
@@ -820,3 +825,17 @@ static NSString *const FBAbstractMethodInvocationException = @"AbstractMethodInv
|
|
|
820
825
|
}
|
|
821
826
|
|
|
822
827
|
@end
|
|
828
|
+
|
|
829
|
+
@implementation FBTraitsAttribute
|
|
830
|
+
|
|
831
|
+
+ (NSString *)name
|
|
832
|
+
{
|
|
833
|
+
return @"traits";
|
|
834
|
+
}
|
|
835
|
+
|
|
836
|
+
+ (NSString *)valueForElement:(id<FBElement>)element
|
|
837
|
+
{
|
|
838
|
+
return element.wdTraits;
|
|
839
|
+
}
|
|
840
|
+
|
|
841
|
+
@end
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
NSString *xmlStr = [FBXPath xmlStringWithRootElement:wrappedSnapshot
|
|
58
58
|
options:nil];
|
|
59
59
|
XCTAssertNotNil(xmlStr);
|
|
60
|
-
NSString *expectedXml = [NSString stringWithFormat:@"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<%@ type=\"%@\" name=\"%@\" label=\"%@\" enabled=\"%@\" visible=\"%@\" accessible=\"%@\" x=\"%@\" y=\"%@\" width=\"%@\" height=\"%@\" index=\"%lu\"/>\n", wrappedSnapshot.wdType, wrappedSnapshot.wdType, wrappedSnapshot.wdName, wrappedSnapshot.wdLabel, FBBoolToString(wrappedSnapshot.wdEnabled), FBBoolToString(wrappedSnapshot.wdVisible), FBBoolToString(wrappedSnapshot.wdAccessible), [wrappedSnapshot.wdRect[@"x"] stringValue], [wrappedSnapshot.wdRect[@"y"] stringValue], [wrappedSnapshot.wdRect[@"width"] stringValue], [wrappedSnapshot.wdRect[@"height"] stringValue], wrappedSnapshot.wdIndex];
|
|
60
|
+
NSString *expectedXml = [NSString stringWithFormat:@"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<%@ type=\"%@\" name=\"%@\" label=\"%@\" enabled=\"%@\" visible=\"%@\" accessible=\"%@\" x=\"%@\" y=\"%@\" width=\"%@\" height=\"%@\" index=\"%lu\" traits=\"%@\"/>\n", wrappedSnapshot.wdType, wrappedSnapshot.wdType, wrappedSnapshot.wdName, wrappedSnapshot.wdLabel, FBBoolToString(wrappedSnapshot.wdEnabled), FBBoolToString(wrappedSnapshot.wdVisible), FBBoolToString(wrappedSnapshot.wdAccessible), [wrappedSnapshot.wdRect[@"x"] stringValue], [wrappedSnapshot.wdRect[@"y"] stringValue], [wrappedSnapshot.wdRect[@"width"] stringValue], [wrappedSnapshot.wdRect[@"height"] stringValue], wrappedSnapshot.wdIndex, wrappedSnapshot.wdTraits];
|
|
61
61
|
XCTAssertEqualObjects(xmlStr, expectedXml);
|
|
62
62
|
}
|
|
63
63
|
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
NSString *xmlStr = [FBXPath xmlStringWithRootElement:wrappedSnapshot
|
|
71
71
|
options:options];
|
|
72
72
|
XCTAssertNotNil(xmlStr);
|
|
73
|
-
NSString *expectedXml = [NSString stringWithFormat:@"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<%@>\n <%@ type=\"%@\" name=\"%@\" label=\"%@\" enabled=\"%@\" visible=\"%@\" accessible=\"%@\" x=\"%@\" y=\"%@\" width=\"%@\" height=\"%@\" index=\"%lu\"/>\n</%@>\n", scope, wrappedSnapshot.wdType, wrappedSnapshot.wdType, wrappedSnapshot.wdName, wrappedSnapshot.wdLabel, FBBoolToString(wrappedSnapshot.wdEnabled), FBBoolToString(wrappedSnapshot.wdVisible), FBBoolToString(wrappedSnapshot.wdAccessible), [wrappedSnapshot.wdRect[@"x"] stringValue], [wrappedSnapshot.wdRect[@"y"] stringValue], [wrappedSnapshot.wdRect[@"width"] stringValue], [wrappedSnapshot.wdRect[@"height"] stringValue], wrappedSnapshot.wdIndex, scope];
|
|
73
|
+
NSString *expectedXml = [NSString stringWithFormat:@"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<%@>\n <%@ type=\"%@\" name=\"%@\" label=\"%@\" enabled=\"%@\" visible=\"%@\" accessible=\"%@\" x=\"%@\" y=\"%@\" width=\"%@\" height=\"%@\" index=\"%lu\" traits=\"%@\"/>\n</%@>\n", scope, wrappedSnapshot.wdType, wrappedSnapshot.wdType, wrappedSnapshot.wdName, wrappedSnapshot.wdLabel, FBBoolToString(wrappedSnapshot.wdEnabled), FBBoolToString(wrappedSnapshot.wdVisible), FBBoolToString(wrappedSnapshot.wdAccessible), [wrappedSnapshot.wdRect[@"x"] stringValue], [wrappedSnapshot.wdRect[@"y"] stringValue], [wrappedSnapshot.wdRect[@"width"] stringValue], [wrappedSnapshot.wdRect[@"height"] stringValue], wrappedSnapshot.wdIndex, wrappedSnapshot.wdTraits, scope];
|
|
74
74
|
XCTAssertEqualObjects(xmlStr, expectedXml);
|
|
75
75
|
}
|
|
76
76
|
|
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
NSString *xmlStr = [FBXPath xmlStringWithRootElement:wrappedSnapshot
|
|
84
84
|
options:options];
|
|
85
85
|
XCTAssertNotNil(xmlStr);
|
|
86
|
-
NSString *expectedXml = [NSString stringWithFormat:@"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<%@ type=\"%@\" name=\"%@\" label=\"%@\" accessible=\"%@\" x=\"%@\" y=\"%@\" width=\"%@\" height=\"%@\"/>\n", wrappedSnapshot.wdType, wrappedSnapshot.wdType, wrappedSnapshot.wdName, wrappedSnapshot.wdLabel, FBBoolToString(wrappedSnapshot.wdAccessible), [wrappedSnapshot.wdRect[@"x"] stringValue], [wrappedSnapshot.wdRect[@"y"] stringValue], [wrappedSnapshot.wdRect[@"width"] stringValue], [wrappedSnapshot.wdRect[@"height"] stringValue]];
|
|
86
|
+
NSString *expectedXml = [NSString stringWithFormat:@"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<%@ type=\"%@\" name=\"%@\" label=\"%@\" accessible=\"%@\" x=\"%@\" y=\"%@\" width=\"%@\" height=\"%@\" traits=\"%@\"/>\n", wrappedSnapshot.wdType, wrappedSnapshot.wdType, wrappedSnapshot.wdName, wrappedSnapshot.wdLabel, FBBoolToString(wrappedSnapshot.wdAccessible), [wrappedSnapshot.wdRect[@"x"] stringValue], [wrappedSnapshot.wdRect[@"y"] stringValue], [wrappedSnapshot.wdRect[@"width"] stringValue], [wrappedSnapshot.wdRect[@"height"] stringValue], wrappedSnapshot.wdTraits];
|
|
87
87
|
XCTAssertEqualObjects(xmlStr, expectedXml);
|
|
88
88
|
}
|
|
89
89
|
|
|
@@ -63,8 +63,9 @@
|
|
|
63
63
|
NSString *resultXml = [self xmlStringWithElement:(id<FBXCElementSnapshot>)element
|
|
64
64
|
xpathQuery:nil
|
|
65
65
|
excludingAttributes:nil];
|
|
66
|
-
|
|
67
|
-
|
|
66
|
+
NSLog(@"[DefaultXPath] Result XML:\n%@", resultXml);
|
|
67
|
+
NSString *expectedXml = [NSString stringWithFormat:@"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<%@ type=\"%@\" value=\"%@\" name=\"%@\" label=\"%@\" enabled=\"%@\" visible=\"%@\" accessible=\"%@\" x=\"%@\" y=\"%@\" width=\"%@\" height=\"%@\" index=\"%lu\" placeholderValue=\"%@\" traits=\"%@\" private_indexPath=\"top\"/>\n",
|
|
68
|
+
element.wdType, element.wdType, element.wdValue, element.wdName, element.wdLabel, FBBoolToString(element.wdEnabled), FBBoolToString(element.wdVisible), FBBoolToString(element.wdAccessible), element.wdRect[@"x"], element.wdRect[@"y"], element.wdRect[@"width"], element.wdRect[@"height"], element.wdIndex, element.wdPlaceholderValue, element.wdTraits];
|
|
68
69
|
XCTAssertTrue([resultXml isEqualToString: expectedXml]);
|
|
69
70
|
}
|
|
70
71
|
|
|
@@ -74,7 +75,7 @@
|
|
|
74
75
|
id<FBElement> element = (id<FBElement>)[FBXCElementSnapshotWrapper ensureWrapped:(id)snapshot];
|
|
75
76
|
NSString *resultXml = [self xmlStringWithElement:(id<FBXCElementSnapshot>)element
|
|
76
77
|
xpathQuery:nil
|
|
77
|
-
excludingAttributes:@[@"type", @"visible", @"value", @"index"]];
|
|
78
|
+
excludingAttributes:@[@"type", @"visible", @"value", @"index", @"traits"]];
|
|
78
79
|
NSString *expectedXml = [NSString stringWithFormat:@"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<%@ name=\"%@\" label=\"%@\" enabled=\"%@\" accessible=\"%@\" x=\"%@\" y=\"%@\" width=\"%@\" height=\"%@\" placeholderValue=\"%@\" private_indexPath=\"top\"/>\n",
|
|
79
80
|
element.wdType, element.wdName, element.wdLabel, FBBoolToString(element.wdEnabled), FBBoolToString(element.wdAccessible), element.wdRect[@"x"], element.wdRect[@"y"], element.wdRect[@"width"], element.wdRect[@"height"], element.wdPlaceholderValue];
|
|
80
81
|
XCTAssertEqualObjects(resultXml, expectedXml);
|
|
@@ -89,8 +90,8 @@
|
|
|
89
90
|
NSString *resultXml = [self xmlStringWithElement:(id<FBXCElementSnapshot>)element
|
|
90
91
|
xpathQuery:[NSString stringWithFormat:@"//%@[@*]", element.wdType]
|
|
91
92
|
excludingAttributes:@[@"visible"]];
|
|
92
|
-
NSString *expectedXml = [NSString stringWithFormat:@"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<%@ type=\"%@\" value=\"%@\" name=\"%@\" label=\"%@\" enabled=\"%@\" visible=\"%@\" accessible=\"%@\" x=\"%@\" y=\"%@\" width=\"%@\" height=\"%@\" index=\"%lu\" hittable=\"%@\" placeholderValue=\"%@\" private_indexPath=\"top\"/>\n",
|
|
93
|
-
element.wdType, element.wdType, @"йоло<>&"", element.wdName, @"a b", FBBoolToString(element.wdEnabled), FBBoolToString(element.wdVisible), FBBoolToString(element.wdAccessible), element.wdRect[@"x"], element.wdRect[@"y"], element.wdRect[@"width"], element.wdRect[@"height"], element.wdIndex, FBBoolToString(element.wdHittable), element.wdPlaceholderValue];
|
|
93
|
+
NSString *expectedXml = [NSString stringWithFormat:@"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<%@ type=\"%@\" value=\"%@\" name=\"%@\" label=\"%@\" enabled=\"%@\" visible=\"%@\" accessible=\"%@\" x=\"%@\" y=\"%@\" width=\"%@\" height=\"%@\" index=\"%lu\" hittable=\"%@\" placeholderValue=\"%@\" traits=\"%@\" private_indexPath=\"top\"/>\n",
|
|
94
|
+
element.wdType, element.wdType, @"йоло<>&"", element.wdName, @"a b", FBBoolToString(element.wdEnabled), FBBoolToString(element.wdVisible), FBBoolToString(element.wdAccessible), element.wdRect[@"x"], element.wdRect[@"y"], element.wdRect[@"width"], element.wdRect[@"height"], element.wdIndex, FBBoolToString(element.wdHittable), element.wdPlaceholderValue, element.wdTraits];
|
|
94
95
|
XCTAssertEqualObjects(expectedXml, resultXml);
|
|
95
96
|
}
|
|
96
97
|
|