appium-webdriveragent 9.10.0 → 9.11.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,15 @@
1
+ ## [9.11.0](https://github.com/appium/WebDriverAgent/compare/v9.10.1...v9.11.0) (2025-06-03)
2
+
3
+ ### Features
4
+
5
+ * Add includeHittableInSource setting for including real hittable attribute in XML source ([#1026](https://github.com/appium/WebDriverAgent/issues/1026)) ([0fa4e74](https://github.com/appium/WebDriverAgent/commit/0fa4e7417404b5975445d381d111753fe681edd4))
6
+
7
+ ## [9.10.1](https://github.com/appium/WebDriverAgent/compare/v9.10.0...v9.10.1) (2025-05-30)
8
+
9
+ ### Miscellaneous Chores
10
+
11
+ * Make sure the same import style is used everywhere ([#1024](https://github.com/appium/WebDriverAgent/issues/1024)) ([1c50072](https://github.com/appium/WebDriverAgent/commit/1c50072457a8b82eec3684029386ccfa9432eccc))
12
+
1
13
  ## [9.10.0](https://github.com/appium/WebDriverAgent/compare/v9.9.0...v9.10.0) (2025-05-27)
2
14
 
3
15
  ### Features
@@ -21,12 +21,12 @@
21
21
  13DE7A4A287C4005003243C6 /* FBXCDeviceEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 13DE7A47287C4005003243C6 /* FBXCDeviceEvent.h */; };
22
22
  13DE7A4B287C4005003243C6 /* FBXCDeviceEvent.m in Sources */ = {isa = PBXBuildFile; fileRef = 13DE7A48287C4005003243C6 /* FBXCDeviceEvent.m */; };
23
23
  13DE7A4C287C4005003243C6 /* FBXCDeviceEvent.m in Sources */ = {isa = PBXBuildFile; fileRef = 13DE7A48287C4005003243C6 /* FBXCDeviceEvent.m */; };
24
- 13DE7A4F287C46BB003243C6 /* FBXCElementSnapshot.h in Headers */ = {isa = PBXBuildFile; fileRef = 13DE7A4D287C46BB003243C6 /* FBXCElementSnapshot.h */; };
25
- 13DE7A50287C46BB003243C6 /* FBXCElementSnapshot.h in Headers */ = {isa = PBXBuildFile; fileRef = 13DE7A4D287C46BB003243C6 /* FBXCElementSnapshot.h */; };
24
+ 13DE7A4F287C46BB003243C6 /* FBXCElementSnapshot.h in Headers */ = {isa = PBXBuildFile; fileRef = 13DE7A4D287C46BB003243C6 /* FBXCElementSnapshot.h */; settings = {ATTRIBUTES = (Public, ); }; };
25
+ 13DE7A50287C46BB003243C6 /* FBXCElementSnapshot.h in Headers */ = {isa = PBXBuildFile; fileRef = 13DE7A4D287C46BB003243C6 /* FBXCElementSnapshot.h */; settings = {ATTRIBUTES = (Public, ); }; };
26
26
  13DE7A51287C46BB003243C6 /* FBXCElementSnapshot.m in Sources */ = {isa = PBXBuildFile; fileRef = 13DE7A4E287C46BB003243C6 /* FBXCElementSnapshot.m */; };
27
27
  13DE7A52287C46BB003243C6 /* FBXCElementSnapshot.m in Sources */ = {isa = PBXBuildFile; fileRef = 13DE7A4E287C46BB003243C6 /* FBXCElementSnapshot.m */; };
28
- 13DE7A55287CA1EC003243C6 /* FBXCElementSnapshotWrapper.h in Headers */ = {isa = PBXBuildFile; fileRef = 13DE7A53287CA1EC003243C6 /* FBXCElementSnapshotWrapper.h */; };
29
- 13DE7A56287CA1EC003243C6 /* FBXCElementSnapshotWrapper.h in Headers */ = {isa = PBXBuildFile; fileRef = 13DE7A53287CA1EC003243C6 /* FBXCElementSnapshotWrapper.h */; };
28
+ 13DE7A55287CA1EC003243C6 /* FBXCElementSnapshotWrapper.h in Headers */ = {isa = PBXBuildFile; fileRef = 13DE7A53287CA1EC003243C6 /* FBXCElementSnapshotWrapper.h */; settings = {ATTRIBUTES = (Public, ); }; };
29
+ 13DE7A56287CA1EC003243C6 /* FBXCElementSnapshotWrapper.h in Headers */ = {isa = PBXBuildFile; fileRef = 13DE7A53287CA1EC003243C6 /* FBXCElementSnapshotWrapper.h */; settings = {ATTRIBUTES = (Public, ); }; };
30
30
  13DE7A57287CA1EC003243C6 /* FBXCElementSnapshotWrapper.m in Sources */ = {isa = PBXBuildFile; fileRef = 13DE7A54287CA1EC003243C6 /* FBXCElementSnapshotWrapper.m */; };
31
31
  13DE7A58287CA1EC003243C6 /* FBXCElementSnapshotWrapper.m in Sources */ = {isa = PBXBuildFile; fileRef = 13DE7A54287CA1EC003243C6 /* FBXCElementSnapshotWrapper.m */; };
32
32
  13DE7A5B287CA444003243C6 /* FBXCElementSnapshotWrapper+Helpers.h in Headers */ = {isa = PBXBuildFile; fileRef = 13DE7A59287CA444003243C6 /* FBXCElementSnapshotWrapper+Helpers.h */; };
@@ -2300,6 +2300,8 @@
2300
2300
  641EE6392240C5CA00173FCB /* FBRouteRequest.h in Headers */,
2301
2301
  648C10AC22AAAD9C00B81B9A /* UIKeyboardImpl.h in Headers */,
2302
2302
  718226CD2587443700661B83 /* GCDAsyncSocket.h in Headers */,
2303
+ 13DE7A50287C46BB003243C6 /* FBXCElementSnapshot.h in Headers */,
2304
+ 13DE7A56287CA1EC003243C6 /* FBXCElementSnapshotWrapper.h in Headers */,
2303
2305
  71F3E7D525417FF400E0C22B /* FBSettings.h in Headers */,
2304
2306
  641EE63A2240C5CA00173FCB /* XCTest.h in Headers */,
2305
2307
  641EE63B2240C5CA00173FCB /* FBAlertsMonitor.h in Headers */,
@@ -2348,7 +2350,6 @@
2348
2350
  641EE6632240C5CA00173FCB /* FBUnknownCommands.h in Headers */,
2349
2351
  641EE7062240CDCF00173FCB /* XCUIElement+FBTVFocuse.h in Headers */,
2350
2352
  71822738258744B800661B83 /* HTTPConnection.h in Headers */,
2351
- 13DE7A56287CA1EC003243C6 /* FBXCElementSnapshotWrapper.h in Headers */,
2352
2353
  641EE6642240C5CA00173FCB /* NSPredicate+FBFormat.h in Headers */,
2353
2354
  641EE6652240C5CA00173FCB /* UILongPressGestureRecognizer-RecordingAdditions.h in Headers */,
2354
2355
  641EE6662240C5CA00173FCB /* XCTestCase.h in Headers */,
@@ -2510,7 +2511,6 @@
2510
2511
  641EE6E72240C5CA00173FCB /* XCUIElement+FBFind.h in Headers */,
2511
2512
  641EE6E82240C5CA00173FCB /* XCTestManager_ManagerInterface-Protocol.h in Headers */,
2512
2513
  641EE6E92240C5CA00173FCB /* FBFailureProofTestCase.h in Headers */,
2513
- 13DE7A50287C46BB003243C6 /* FBXCElementSnapshot.h in Headers */,
2514
2514
  641EE6EA2240C5CA00173FCB /* XCTTestRunSessionDelegate-Protocol.h in Headers */,
2515
2515
  641EE6EB2240C5CA00173FCB /* XCTestCaseSuite.h in Headers */,
2516
2516
  641EE6EC2240C5CA00173FCB /* _XCInternalTestRun.h in Headers */,
@@ -2581,6 +2581,7 @@
2581
2581
  EE35AD721E3B77D600A02D78 /* XCUIElementHitPointCoordinate.h in Headers */,
2582
2582
  EE35AD3F1E3B77D600A02D78 /* XCTDarwinNotificationExpectation.h in Headers */,
2583
2583
  EE35AD5F1E3B77D600A02D78 /* XCTRunnerAutomationSession.h in Headers */,
2584
+ 13DE7A4F287C46BB003243C6 /* FBXCElementSnapshot.h in Headers */,
2584
2585
  71C9EAAC25E8415A00470CD8 /* FBScreenshot.h in Headers */,
2585
2586
  EE35AD371E3B77D600A02D78 /* XCSourceCodeTreeNodeEnumerator.h in Headers */,
2586
2587
  EE158AB01CBD456F00A3E3F0 /* XCUIElement+FBIsVisible.h in Headers */,
@@ -2678,7 +2679,6 @@
2678
2679
  EE158AB81CBD456F00A3E3F0 /* FBAlertViewCommands.h in Headers */,
2679
2680
  EE35AD651E3B77D600A02D78 /* XCTWaiter.h in Headers */,
2680
2681
  EE35AD681E3B77D600A02D78 /* XCTWaiterManagement-Protocol.h in Headers */,
2681
- 13DE7A4F287C46BB003243C6 /* FBXCElementSnapshot.h in Headers */,
2682
2682
  EE35AD451E3B77D600A02D78 /* XCTestContext.h in Headers */,
2683
2683
  EE35AD661E3B77D600A02D78 /* XCTWaiterDelegate-Protocol.h in Headers */,
2684
2684
  EE35AD0E1E3B77D600A02D78 /* _XCTestExpectationImplementation.h in Headers */,
@@ -8,7 +8,7 @@
8
8
  */
9
9
 
10
10
  #import <WebDriverAgentLib/XCUIElement.h>
11
- #import "FBXCElementSnapshotWrapper.h"
11
+ #import <WebDriverAgentLib/FBXCElementSnapshotWrapper.h>
12
12
 
13
13
  NS_ASSUME_NONNULL_BEGIN
14
14
 
@@ -7,7 +7,7 @@
7
7
  * of patent rights can be found in the PATENTS file in the same directory.
8
8
  */
9
9
 
10
- #import "FBXCElementSnapshotWrapper.h"
10
+ #import <WebDriverAgentLib/FBXCElementSnapshotWrapper.h>
11
11
 
12
12
  NS_ASSUME_NONNULL_BEGIN
13
13
 
@@ -9,7 +9,7 @@
9
9
 
10
10
  #import <XCTest/XCTest.h>
11
11
  #import <WebDriverAgentLib/FBElement.h>
12
- #import "FBXCElementSnapshot.h"
12
+ #import <WebDriverAgentLib/FBXCElementSnapshot.h>
13
13
 
14
14
  NS_ASSUME_NONNULL_BEGIN
15
15
 
@@ -9,7 +9,7 @@
9
9
 
10
10
  #import <WebDriverAgentLib/FBElement.h>
11
11
  #import <WebDriverAgentLib/XCUIElement.h>
12
- #import "FBXCElementSnapshotWrapper.h"
12
+ #import <WebDriverAgentLib/FBXCElementSnapshotWrapper.h>
13
13
 
14
14
  NS_ASSUME_NONNULL_BEGIN
15
15
 
@@ -353,6 +353,7 @@
353
353
  FB_SETTING_MAX_TYPING_FREQUENCY: @([FBConfiguration maxTypingFrequency]),
354
354
  FB_SETTING_RESPECT_SYSTEM_ALERTS: @([FBConfiguration shouldRespectSystemAlerts]),
355
355
  FB_SETTING_USE_CLEAR_TEXT_SHORTCUT: @([FBConfiguration useClearTextShortcut]),
356
+ FB_SETTING_INCLUDE_HITTABLE_IN_PAGE_SOURCE: @([FBConfiguration includeHittableInPageSource]),
356
357
  FB_SETTING_LIMIT_XPATH_CONTEXT_SCOPE: @([FBConfiguration limitXpathContextScope]),
357
358
  #if !TARGET_OS_TV
358
359
  FB_SETTING_SCREENSHOT_ORIENTATION: [FBConfiguration humanReadableScreenshotOrientation],
@@ -455,6 +456,9 @@
455
456
  if (nil != [settings objectForKey:FB_SETTING_USE_CLEAR_TEXT_SHORTCUT]) {
456
457
  [FBConfiguration setUseClearTextShortcut:[[settings objectForKey:FB_SETTING_USE_CLEAR_TEXT_SHORTCUT] boolValue]];
457
458
  }
459
+ if (nil != [settings objectForKey:FB_SETTING_INCLUDE_HITTABLE_IN_PAGE_SOURCE]) {
460
+ [FBConfiguration setincludeHittableInPageSource:[[settings objectForKey:FB_SETTING_INCLUDE_HITTABLE_IN_PAGE_SOURCE] boolValue]];
461
+ }
458
462
  if (nil != [settings objectForKey:FB_SETTING_LIMIT_XPATH_CONTEXT_SCOPE]) {
459
463
  [FBConfiguration setLimitXpathContextScope:[[settings objectForKey:FB_SETTING_LIMIT_XPATH_CONTEXT_SCOPE] boolValue]];
460
464
  }
@@ -15,11 +15,11 @@
15
15
  <key>CFBundlePackageType</key>
16
16
  <string>FMWK</string>
17
17
  <key>CFBundleShortVersionString</key>
18
- <string>9.10.0</string>
18
+ <string>9.11.0</string>
19
19
  <key>CFBundleSignature</key>
20
20
  <string>????</string>
21
21
  <key>CFBundleVersion</key>
22
- <string>9.10.0</string>
22
+ <string>9.11.0</string>
23
23
  <key>NSPrincipalClass</key>
24
24
  <string/>
25
25
  </dict>
@@ -332,6 +332,17 @@ typedef NS_ENUM(NSInteger, FBConfigurationKeyboardPreference) {
332
332
  */
333
333
  + (void)resetSessionSettings;
334
334
 
335
+ /**
336
+ * Whether to calculate `hittable` attribute using native APIs
337
+ * instead of legacy heuristics.
338
+ * This flag improves accuracy, but may affect performance.
339
+ * Disabled by default.
340
+ *
341
+ * @param enabled Either YES or NO
342
+ */
343
+ + (void)setincludeHittableInPageSource:(BOOL)enabled;
344
+ + (BOOL)includeHittableInPageSource;
345
+
335
346
  @end
336
347
 
337
348
  NS_ASSUME_NONNULL_END
@@ -61,6 +61,7 @@ static BOOL FBLimitXpathContextScope = YES;
61
61
  #if !TARGET_OS_TV
62
62
  static UIInterfaceOrientation FBScreenshotOrientation;
63
63
  #endif
64
+ static BOOL FBShouldincludeHittableInPageSource = NO;
64
65
 
65
66
  @implementation FBConfiguration
66
67
 
@@ -642,4 +643,14 @@ static UIInterfaceOrientation FBScreenshotOrientation;
642
643
  return NO;
643
644
  }
644
645
 
646
+ + (void)setincludeHittableInPageSource:(BOOL)enabled
647
+ {
648
+ FBShouldincludeHittableInPageSource = enabled;
649
+ }
650
+
651
+ + (BOOL)includeHittableInPageSource
652
+ {
653
+ return FBShouldincludeHittableInPageSource;
654
+ }
655
+
645
656
  @end
@@ -40,6 +40,7 @@ extern NSString* const FB_SETTING_RESPECT_SYSTEM_ALERTS;
40
40
  extern NSString* const FB_SETTING_USE_CLEAR_TEXT_SHORTCUT;
41
41
  extern NSString* const FB_SETTING_LIMIT_XPATH_CONTEXT_SCOPE;
42
42
  extern NSString* const FB_SETTING_AUTO_CLICK_ALERT_SELECTOR;
43
+ extern NSString *const FB_SETTING_INCLUDE_HITTABLE_IN_PAGE_SOURCE;
43
44
 
44
45
 
45
46
  NS_ASSUME_NONNULL_END
@@ -36,3 +36,4 @@ NSString* const FB_SETTING_RESPECT_SYSTEM_ALERTS = @"respectSystemAlerts";
36
36
  NSString* const FB_SETTING_USE_CLEAR_TEXT_SHORTCUT = @"useClearTextShortcut";
37
37
  NSString* const FB_SETTING_LIMIT_XPATH_CONTEXT_SCOPE = @"limitXPathContextScope";
38
38
  NSString* const FB_SETTING_AUTO_CLICK_ALERT_SELECTOR = @"autoClickAlertSelector";
39
+ NSString* const FB_SETTING_INCLUDE_HITTABLE_IN_PAGE_SOURCE = @"includeHittableInPageSource";
@@ -9,7 +9,7 @@
9
9
 
10
10
  #import <XCTest/XCTest.h>
11
11
  #import <WebDriverAgentLib/FBElement.h>
12
- #import "FBXCElementSnapshot.h"
12
+ #import <WebDriverAgentLib/FBXCElementSnapshot.h>
13
13
 
14
14
  #ifdef __clang__
15
15
  #pragma clang diagnostic push
@@ -147,7 +147,10 @@ static NSString *const topNodeIndexPath = @"top";
147
147
 
148
148
  if (rc >= 0) {
149
149
  [self waitUntilStableWithElement:root];
150
- rc = [self xmlRepresentationWithRootElement:[self snapshotWithRoot:root useNative:NO]
150
+ // If 'includeHittableInPageSource' setting is enabled, then use native snapshots
151
+ // to calculate a more accurate value for the 'hittable' attribute.
152
+ rc = [self xmlRepresentationWithRootElement:[self snapshotWithRoot:root
153
+ useNative:FBConfiguration.includeHittableInPageSource]
151
154
  writer:writer
152
155
  elementStore:nil
153
156
  query:nil
@@ -354,9 +357,11 @@ static NSString *const topNodeIndexPath = @"top";
354
357
  NSMutableSet<Class> *includedAttributes;
355
358
  if (nil == query) {
356
359
  includedAttributes = [NSMutableSet setWithArray:FBElementAttribute.supportedAttributes];
357
- // The hittable attribute is expensive to calculate for each snapshot item
358
- // thus we only include it when requested by an xPath query
359
- [includedAttributes removeObject:FBHittableAttribute.class];
360
+ if (!FBConfiguration.includeHittableInPageSource) {
361
+ // The hittable attribute is expensive to calculate for each snapshot item
362
+ // thus we only include it when requested explicitly
363
+ [includedAttributes removeObject:FBHittableAttribute.class];
364
+ }
360
365
  if (nil != excludedAttributes) {
361
366
  for (NSString *excludedAttributeName in excludedAttributes) {
362
367
  for (Class supportedAttribute in FBElementAttribute.supportedAttributes) {
@@ -15,6 +15,7 @@ FOUNDATION_EXPORT double WebDriverAgentLib_VersionNumber;
15
15
  //! Project version string for WebDriverAgentLib_.
16
16
  FOUNDATION_EXPORT const unsigned char WebDriverAgentLib_VersionString[];
17
17
 
18
+ #import <WebDriverAgentLib/CDStructures.h>
18
19
  #import <WebDriverAgentLib/FBAlert.h>
19
20
  #import <WebDriverAgentLib/FBCommandHandler.h>
20
21
  #import <WebDriverAgentLib/FBCommandStatus.h>
@@ -38,9 +39,17 @@ FOUNDATION_EXPORT const unsigned char WebDriverAgentLib_VersionString[];
38
39
  #import <WebDriverAgentLib/FBRuntimeUtils.h>
39
40
  #import <WebDriverAgentLib/FBSession.h>
40
41
  #import <WebDriverAgentLib/FBWebServer.h>
42
+ #import <WebDriverAgentLib/FBXCElementSnapshot.h>
43
+ #import <WebDriverAgentLib/FBXCElementSnapshotWrapper.h>
44
+ #import <WebDriverAgentLib/FBXPath.h>
45
+ #import <WebDriverAgentLib/WebDriverAgentLib.h>
46
+ #import <WebDriverAgentLib/XCDebugLogDelegate-Protocol.h>
47
+ #import <WebDriverAgentLib/XCTestCase.h>
48
+ #import <WebDriverAgentLib/XCTIssue+FBPatcher.h>
41
49
  #import <WebDriverAgentLib/XCUIApplication+FBHelpers.h>
42
50
  #import <WebDriverAgentLib/XCUIDevice+FBHelpers.h>
43
51
  #import <WebDriverAgentLib/XCUIDevice+FBRotation.h>
52
+ #import <WebDriverAgentLib/XCUIElement.h>
44
53
  #import <WebDriverAgentLib/XCUIElement+FBAccessibility.h>
45
54
  #import <WebDriverAgentLib/XCUIElement+FBFind.h>
46
55
  #import <WebDriverAgentLib/XCUIElement+FBIsVisible.h>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "appium-webdriveragent",
3
- "version": "9.10.0",
3
+ "version": "9.11.0",
4
4
  "description": "Package bundling WebDriverAgent",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",