appium-webdriveragent 9.10.1 → 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 +6 -0
- package/WebDriverAgentLib/Commands/FBSessionCommands.m +4 -0
- package/WebDriverAgentLib/Info.plist +2 -2
- package/WebDriverAgentLib/Utilities/FBConfiguration.h +11 -0
- package/WebDriverAgentLib/Utilities/FBConfiguration.m +11 -0
- package/WebDriverAgentLib/Utilities/FBSettings.h +1 -0
- package/WebDriverAgentLib/Utilities/FBSettings.m +1 -0
- package/WebDriverAgentLib/Utilities/FBXPath.m +9 -4
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
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
|
+
|
|
1
7
|
## [9.10.1](https://github.com/appium/WebDriverAgent/compare/v9.10.0...v9.10.1) (2025-05-30)
|
|
2
8
|
|
|
3
9
|
### Miscellaneous Chores
|
|
@@ -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.
|
|
18
|
+
<string>9.11.0</string>
|
|
19
19
|
<key>CFBundleSignature</key>
|
|
20
20
|
<string>????</string>
|
|
21
21
|
<key>CFBundleVersion</key>
|
|
22
|
-
<string>9.
|
|
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";
|
|
@@ -147,7 +147,10 @@ static NSString *const topNodeIndexPath = @"top";
|
|
|
147
147
|
|
|
148
148
|
if (rc >= 0) {
|
|
149
149
|
[self waitUntilStableWithElement:root];
|
|
150
|
-
|
|
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
|
-
|
|
358
|
-
|
|
359
|
-
|
|
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) {
|