appium-webdriveragent 9.3.3 → 9.4.1

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,15 @@
1
+ ## [9.4.1](https://github.com/appium/WebDriverAgent/compare/v9.4.0...v9.4.1) (2025-04-05)
2
+
3
+ ### Miscellaneous Chores
4
+
5
+ * bump appium-ios-simulator ([445741d](https://github.com/appium/WebDriverAgent/commit/445741d03313019016d4232f49e656d50f673f16))
6
+
7
+ ## [9.4.0](https://github.com/appium/WebDriverAgent/compare/v9.3.3...v9.4.0) (2025-04-02)
8
+
9
+ ### Features
10
+
11
+ * 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))
12
+
1
13
  ## [9.3.3](https://github.com/appium/WebDriverAgent/compare/v9.3.2...v9.3.3) (2025-03-27)
2
14
 
3
15
  ### 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.3.3</string>
18
+ <string>9.4.1</string>
19
19
  <key>CFBundleSignature</key>
20
20
  <string>????</string>
21
21
  <key>CFBundleVersion</key>
22
- <string>9.3.3</string>
22
+ <string>9.4.1</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
- XCTAssertNotNil(self.testedApplication.fb_tree);
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
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "appium-webdriveragent",
3
- "version": "9.3.3",
3
+ "version": "9.4.1",
4
4
  "description": "Package bundling WebDriverAgent",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",
@@ -77,7 +77,7 @@
77
77
  "@appium/strongbox": "^0.x",
78
78
  "@appium/support": "^6.0.0",
79
79
  "appium-ios-device": "^2.7.25",
80
- "appium-ios-simulator": "^6.0.0",
80
+ "appium-ios-simulator": "^6.2.2",
81
81
  "async-lock": "^1.0.0",
82
82
  "asyncbox": "^3.0.0",
83
83
  "axios": "^1.4.0",