appium-webdriveragent 9.3.3 → 9.4.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
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
## [9.4.0](https://github.com/appium/WebDriverAgent/compare/v9.3.3...v9.4.0) (2025-04-02)
|
|
2
|
+
|
|
3
|
+
### Features
|
|
4
|
+
|
|
5
|
+
* Always apply the native snapshotting strategy for XCUIApplication instances ([#998](https://github.com/appium/WebDriverAgent/issues/998)) ([60f5aef](https://github.com/appium/WebDriverAgent/commit/60f5aeffdda85faffd60aba416dc9d92987f19ac))
|
|
6
|
+
|
|
1
7
|
## [9.3.3](https://github.com/appium/WebDriverAgent/compare/v9.3.2...v9.3.3) (2025-03-27)
|
|
2
8
|
|
|
3
9
|
### Bug Fixes
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
__block id<FBXCElementSnapshot> snapshot = nil;
|
|
50
50
|
@autoreleasepool {
|
|
51
51
|
NSError *error = nil;
|
|
52
|
-
snapshot = inDepth
|
|
52
|
+
snapshot = inDepth && ![self isKindOfClass:XCUIApplication.class]
|
|
53
53
|
? [self.fb_query fb_uniqueSnapshotWithError:&error]
|
|
54
54
|
: (id<FBXCElementSnapshot>)[self snapshotWithError:&error];
|
|
55
55
|
if (nil == snapshot) {
|
|
@@ -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.4.0</string>
|
|
19
19
|
<key>CFBundleSignature</key>
|
|
20
20
|
<string>????</string>
|
|
21
21
|
<key>CFBundleVersion</key>
|
|
22
|
-
<string>9.
|
|
22
|
+
<string>9.4.0</string>
|
|
23
23
|
<key>NSPrincipalClass</key>
|
|
24
24
|
<string/>
|
|
25
25
|
</dict>
|
|
@@ -20,6 +20,23 @@
|
|
|
20
20
|
#import "XCUIElement+FBIsVisible.h"
|
|
21
21
|
#import "FBXCodeCompatibility.h"
|
|
22
22
|
|
|
23
|
+
void calculateMaxTreeDepth(NSDictionary *tree, NSNumber *currentDepth, NSNumber** maxDepth) {
|
|
24
|
+
if (nil == maxDepth) {
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
NSArray *children = tree[@"children"];
|
|
29
|
+
if (nil == children || 0 == children.count) {
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
for (NSDictionary *child in children) {
|
|
33
|
+
if (currentDepth.integerValue > [*maxDepth integerValue]) {
|
|
34
|
+
*maxDepth = currentDepth;
|
|
35
|
+
}
|
|
36
|
+
calculateMaxTreeDepth(child, @(currentDepth.integerValue + 1), maxDepth);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
23
40
|
@interface XCUIApplicationHelperTests : FBIntegrationTestCase
|
|
24
41
|
@end
|
|
25
42
|
|
|
@@ -40,7 +57,11 @@
|
|
|
40
57
|
|
|
41
58
|
- (void)testApplicationTree
|
|
42
59
|
{
|
|
43
|
-
|
|
60
|
+
NSDictionary *tree = self.testedApplication.fb_tree;
|
|
61
|
+
XCTAssertNotNil(tree);
|
|
62
|
+
NSNumber *maxDepth;
|
|
63
|
+
calculateMaxTreeDepth(tree, @0, &maxDepth);
|
|
64
|
+
XCTAssertGreaterThan(maxDepth.integerValue, 3);
|
|
44
65
|
XCTAssertNotNil(self.testedApplication.fb_accessibilityTree);
|
|
45
66
|
}
|
|
46
67
|
|