appium-webdriveragent 16.16.5 → 16.17.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
@@ -3,6 +3,13 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [16.17.0](https://github.com/appium/appium-ios/compare/appium-webdriveragent@16.16.5...appium-webdriveragent@16.17.0) (2026-10-21)
7
+
8
+ ### Features
9
+
10
+ * **webdriveragent:** add route for retrieving pressButton values ([#102](https://github.com/appium/appium-ios/issues/102)) ([5b4eaaa](https://github.com/appium/appium-ios/commit/5b4eaaacc7b97d571ab269f98a4e23396be7bae1))
11
+
12
+
6
13
  ## [16.16.5](https://github.com/appium/appium-ios/compare/appium-webdriveragent@16.16.4...appium-webdriveragent@16.16.5) (2026-10-21)
7
14
 
8
15
  ### Code Refactoring
@@ -233,4 +233,10 @@ typedef NS_ENUM(NSUInteger, FBUIInterfaceAppearance) {
233
233
 
234
234
  @end
235
235
 
236
+ /**
237
+ Returns the map of lowercase button names to their XCTest enum values
238
+ supported on the current platform (cached after the first call).
239
+ */
240
+ extern NSDictionary<NSString *, NSNumber *> *FBAvailableButtonNames(void);
241
+
236
242
  NS_ASSUME_NONNULL_END
@@ -33,7 +33,7 @@ static NSString *const FBClockFaceBundleId = @"com.apple.clockface";
33
33
  #endif
34
34
 
35
35
  #if TARGET_OS_TV
36
- NSDictionary<NSString *, NSNumber *> *fb_availableButtonNames(void) {
36
+ NSDictionary<NSString *, NSNumber *> *FBAvailableButtonNames(void) {
37
37
  static dispatch_once_t onceToken;
38
38
  static NSDictionary *result;
39
39
  dispatch_once(&onceToken, ^{
@@ -64,7 +64,7 @@ NSDictionary<NSString *, NSNumber *> *fb_availableButtonNames(void) {
64
64
  return result;
65
65
  }
66
66
  #else
67
- NSDictionary<NSString *, NSNumber *> *fb_availableButtonNames(void) {
67
+ NSDictionary<NSString *, NSNumber *> *FBAvailableButtonNames(void) {
68
68
  static dispatch_once_t onceToken;
69
69
  static NSDictionary *result;
70
70
  dispatch_once(&onceToken, ^{
@@ -379,7 +379,7 @@ static bool fb_isLocked;
379
379
 
380
380
  - (BOOL)fb_hasButton:(NSString *)buttonName
381
381
  {
382
- return fb_availableButtonNames()[buttonName.lowercaseString] != nil;
382
+ return FBAvailableButtonNames()[buttonName.lowercaseString] != nil;
383
383
  }
384
384
 
385
385
  - (BOOL)fb_pressButton:(NSString *)buttonName
@@ -390,7 +390,7 @@ static bool fb_isLocked;
390
390
  return [self fb_pressButton:buttonName error:error];
391
391
  #else
392
392
 
393
- NSDictionary<NSString *, NSNumber *> *availableButtons = fb_availableButtonNames();
393
+ NSDictionary<NSString *, NSNumber *> *availableButtons = FBAvailableButtonNames();
394
394
  NSNumber *buttonValue = availableButtons[buttonName.lowercaseString];
395
395
 
396
396
  if (!buttonValue) {
@@ -414,7 +414,7 @@ static bool fb_isLocked;
414
414
  - (BOOL)fb_pressButton:(NSString *)buttonName
415
415
  error:(NSError **)error
416
416
  {
417
- NSDictionary<NSString *, NSNumber *> *availableButtons = fb_availableButtonNames();
417
+ NSDictionary<NSString *, NSNumber *> *availableButtons = FBAvailableButtonNames();
418
418
  NSNumber *buttonValue = availableButtons[buttonName.lowercaseString];
419
419
 
420
420
  if (!buttonValue) {
@@ -67,6 +67,8 @@
67
67
  [[FBRoute GET:@"/wda/batteryInfo"] respondWithTarget:self action:@selector(handleGetBatteryInfo:)],
68
68
  #endif
69
69
  [[FBRoute POST:@"/wda/pressButton"] respondWithTarget:self action:@selector(handlePressButtonCommand:)],
70
+ [[FBRoute GET:@"/wda/pressableButtons"] respondWithTarget:self action:@selector(handleGetPressableButtons:)],
71
+ [[FBRoute GET:@"/wda/pressableButtons"].withoutSession respondWithTarget:self action:@selector(handleGetPressableButtons:)],
70
72
  #if TARGET_OS_WATCH
71
73
  [[FBRoute POST:@"/wda/rotateDigitalCrown"] respondWithTarget:self action:@selector(handleRotateDigitalCrownCommand:)],
72
74
  [[FBRoute POST:@"/wda/performHandGesture"] respondWithTarget:self action:@selector(handlePerformHandGestureCommand:)],
@@ -352,6 +354,12 @@
352
354
  return FBResponseWithOK();
353
355
  }
354
356
 
357
+ + (id<FBResponsePayload>)handleGetPressableButtons:(FBRouteRequest *)request
358
+ {
359
+ NSArray *xctestButtonNames = [FBAvailableButtonNames().allKeys sortedArrayUsingSelector:@selector(compare:)];
360
+ return FBResponseWithObject(@{@"xctest": xctestButtonNames});
361
+ }
362
+
355
363
  #if TARGET_OS_WATCH
356
364
  + (id<FBResponsePayload>)handleRotateDigitalCrownCommand:(FBRouteRequest *)request
357
365
  {
@@ -15,11 +15,11 @@
15
15
  <key>CFBundlePackageType</key>
16
16
  <string>FMWK</string>
17
17
  <key>CFBundleShortVersionString</key>
18
- <string>16.16.5</string>
18
+ <string>16.17.0</string>
19
19
  <key>CFBundleSignature</key>
20
20
  <string>????</string>
21
21
  <key>CFBundleVersion</key>
22
- <string>16.16.5</string>
22
+ <string>16.17.0</string>
23
23
  <key>NSPrincipalClass</key>
24
24
  <string/>
25
25
  </dict>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "appium-webdriveragent",
3
- "version": "16.16.5",
3
+ "version": "16.17.0",
4
4
  "description": "Package bundling WebDriverAgent",
5
5
  "keywords": [
6
6
  "Appium",
@@ -85,5 +85,5 @@
85
85
  "node": "^20.19.0 || ^22.12.0 || >=24.0.0",
86
86
  "npm": ">=10"
87
87
  },
88
- "gitHead": "7585a1f072ba795cf923708e91db890ef3a2dfb4"
88
+ "gitHead": "3369e1484f3cb822b22f2fd4c06ddc9c3d48c0a6"
89
89
  }