appium-webdriveragent 16.17.0 → 16.17.2

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,20 @@
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.2](https://github.com/appium/appium-ios/compare/appium-webdriveragent@16.17.1...appium-webdriveragent@16.17.2) (2026-10-23)
7
+
8
+ ### Bug Fixes
9
+
10
+ * wait for a hittable key only when keyboardWaitTimeout is set ([#93](https://github.com/appium/appium-ios/issues/93)) ([5a3eed4](https://github.com/appium/appium-ios/commit/5a3eed4b07172fce2413f4d55c1686da68fe6140))
11
+
12
+
13
+ ## [16.17.1](https://github.com/appium/appium-ios/compare/appium-webdriveragent@16.17.0...appium-webdriveragent@16.17.1) (2026-10-21)
14
+
15
+ ### Bug Fixes
16
+
17
+ * **webdriveragent:** do not embed lib_TestingInterop.dylib on Xcode 26.0-26.3 ([#104](https://github.com/appium/appium-ios/issues/104)) ([a78d1fe](https://github.com/appium/appium-ios/commit/a78d1fee46b483613b2e659936b490573cfc81d6))
18
+
19
+
6
20
  ## [16.17.0](https://github.com/appium/appium-ios/compare/appium-webdriveragent@16.16.5...appium-webdriveragent@16.17.0) (2026-10-21)
7
21
 
8
22
  ### Features
@@ -6240,12 +6240,17 @@
6240
6240
  isa = XCBuildConfiguration;
6241
6241
  baseConfigurationReference = EEE5CABF1C80361500CBBDD9 /* IOSSettings.xcconfig */;
6242
6242
  buildSettings = {
6243
- "EXCLUDED_SOURCE_FILE_NAMES[sdk=iphonesimulator*]" = "$(inherited) $(WDA_XCTEST_EXCLUDED_$(XCODE_VERSION_MAJOR))";
6243
+ "EXCLUDED_SOURCE_FILE_NAMES[sdk=iphonesimulator*]" = "$(inherited) $(WDA_XCTEST_EXCLUDED_$(XCODE_VERSION_MAJOR)) $(WDA_XCTEST_EXCLUDED_MINOR_$(XCODE_VERSION_MINOR))";
6244
6244
  "EXCLUDED_SOURCE_FILE_NAMES[sdk=iphoneos*]" = "$(inherited) $(WDA_XCTEST_EXCLUDED_1600)";
6245
6245
  /* Reuse Xcode 26 framework embedding; add only its missing dependencies. */
6246
6246
  WDA_XCTEST_EXCLUDED_2600 = "XCTest.framework XCTestCore.framework XCUIAutomation.framework XCTAutomationSupport.framework Testing.framework ResultDataPublisher.framework XCTestSupport.framework libXCTestSwiftSupport.dylib";
6247
6247
  /* Xcode 16 does not need the additional Swift Testing dependencies. */
6248
6248
  WDA_XCTEST_EXCLUDED_1600 = "$(WDA_XCTEST_EXCLUDED_2600) lib_TestingInterop.dylib _Testing_Foundation.framework";
6249
+ /* Xcode 26.0-26.3 do not ship lib_TestingInterop.dylib, so there is nothing to embed. */
6250
+ WDA_XCTEST_EXCLUDED_MINOR_2600 = lib_TestingInterop.dylib;
6251
+ WDA_XCTEST_EXCLUDED_MINOR_2610 = lib_TestingInterop.dylib;
6252
+ WDA_XCTEST_EXCLUDED_MINOR_2620 = lib_TestingInterop.dylib;
6253
+ WDA_XCTEST_EXCLUDED_MINOR_2630 = lib_TestingInterop.dylib;
6249
6254
 
6250
6255
  ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
6251
6256
  CLANG_STATIC_ANALYZER_MODE = deep;
@@ -6301,12 +6306,17 @@
6301
6306
  isa = XCBuildConfiguration;
6302
6307
  baseConfigurationReference = EEE5CABF1C80361500CBBDD9 /* IOSSettings.xcconfig */;
6303
6308
  buildSettings = {
6304
- "EXCLUDED_SOURCE_FILE_NAMES[sdk=iphonesimulator*]" = "$(inherited) $(WDA_XCTEST_EXCLUDED_$(XCODE_VERSION_MAJOR))";
6309
+ "EXCLUDED_SOURCE_FILE_NAMES[sdk=iphonesimulator*]" = "$(inherited) $(WDA_XCTEST_EXCLUDED_$(XCODE_VERSION_MAJOR)) $(WDA_XCTEST_EXCLUDED_MINOR_$(XCODE_VERSION_MINOR))";
6305
6310
  "EXCLUDED_SOURCE_FILE_NAMES[sdk=iphoneos*]" = "$(inherited) $(WDA_XCTEST_EXCLUDED_1600)";
6306
6311
  /* Reuse Xcode 26 framework embedding; add only its missing dependencies. */
6307
6312
  WDA_XCTEST_EXCLUDED_2600 = "XCTest.framework XCTestCore.framework XCUIAutomation.framework XCTAutomationSupport.framework Testing.framework ResultDataPublisher.framework XCTestSupport.framework libXCTestSwiftSupport.dylib";
6308
6313
  /* Xcode 16 does not need the additional Swift Testing dependencies. */
6309
6314
  WDA_XCTEST_EXCLUDED_1600 = "$(WDA_XCTEST_EXCLUDED_2600) lib_TestingInterop.dylib _Testing_Foundation.framework";
6315
+ /* Xcode 26.0-26.3 do not ship lib_TestingInterop.dylib, so there is nothing to embed. */
6316
+ WDA_XCTEST_EXCLUDED_MINOR_2600 = lib_TestingInterop.dylib;
6317
+ WDA_XCTEST_EXCLUDED_MINOR_2610 = lib_TestingInterop.dylib;
6318
+ WDA_XCTEST_EXCLUDED_MINOR_2620 = lib_TestingInterop.dylib;
6319
+ WDA_XCTEST_EXCLUDED_MINOR_2630 = lib_TestingInterop.dylib;
6310
6320
 
6311
6321
  ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
6312
6322
  CLANG_STATIC_ANALYZER_MODE = deep;
@@ -21,6 +21,13 @@ NS_ASSUME_NONNULL_BEGIN
21
21
  */
22
22
  BOOL FBTypeText(NSString *text, NSUInteger typingSpeed, NSError **error);
23
23
 
24
+ #if TARGET_OS_IOS
25
+ /**
26
+ Waits up to `timeout` seconds for a hittable key. A miss does not fail the caller.
27
+ */
28
+ void FBWaitForHittableKey(XCUIApplication * _Nullable application, NSTimeInterval timeout);
29
+ #endif
30
+
24
31
  @interface XCUIElement (FBTyping)
25
32
 
26
33
  /**
@@ -10,6 +10,7 @@
10
10
 
11
11
  #import "FBConfiguration.h"
12
12
  #import "FBErrorBuilder.h"
13
+ #import "FBKeyboard.h"
13
14
  #import "FBXCElementSnapshotWrapper.h"
14
15
  #import "FBXCElementSnapshotWrapper+Helpers.h"
15
16
  #import "FBXCodeCompatibility.h"
@@ -39,6 +40,19 @@ BOOL FBTypeText(NSString *text, NSUInteger typingSpeed, NSError **error)
39
40
  return [FBXCTestDaemonsProxy synthesizeEventWithRecord:eventRecord error:error];
40
41
  }
41
42
 
43
+ #if TARGET_OS_IOS
44
+ void FBWaitForHittableKey(XCUIApplication *application, NSTimeInterval timeout)
45
+ {
46
+ if (nil == application) {
47
+ return;
48
+ }
49
+ NSError *visibilityError = nil;
50
+ [FBKeyboard waitUntilVisibleForApplication:application
51
+ timeout:timeout
52
+ error:&visibilityError];
53
+ }
54
+ #endif
55
+
42
56
  @interface NSString (FBRepeat)
43
57
 
44
58
  - (NSString *)fb_repeatTimes:(NSUInteger)times;
@@ -139,6 +153,12 @@ BOOL FBTypeText(NSString *text, NSUInteger typingSpeed, NSError **error)
139
153
  // partial workaround (keystrokes still don't always land - a known limitation).
140
154
  [self typeText:text];
141
155
  return YES;
156
+ #elif TARGET_OS_IOS
157
+ NSTimeInterval keyboardWait = FBConfiguration.sharedInstance.keyboardWaitTimeout;
158
+ if (keyboardWait > 0) {
159
+ FBWaitForHittableKey(self.application, keyboardWait);
160
+ }
161
+ return FBTypeText(text, frequency, error);
142
162
  #else
143
163
  return FBTypeText(text, frequency, error);
144
164
  #endif
@@ -11,7 +11,6 @@
11
11
  #import "FBConfiguration.h"
12
12
  #import "FBScreen.h"
13
13
  #import "XCUIScreen.h"
14
- #import "FBKeyboard.h"
15
14
  #import "FBRoute.h"
16
15
  #import "FBRouteRequest.h"
17
16
  #import "FBRunLoopSpinner.h"
@@ -556,6 +555,13 @@
556
555
  NSString *textToType = [request.arguments[@"value"] componentsJoinedByString:@""];
557
556
  NSUInteger frequency = [request.arguments[@"frequency"] unsignedIntegerValue] ?: FBConfiguration.sharedInstance.maxTypingFrequency;
558
557
  NSError *error;
558
+ #if TARGET_OS_IOS
559
+ NSTimeInterval keyboardWait = FBConfiguration.sharedInstance.keyboardWaitTimeout;
560
+ if (keyboardWait > 0) {
561
+ XCUIApplication *application = request.session.activeApplication ?: XCUIApplication.fb_activeApplication;
562
+ FBWaitForHittableKey(application, keyboardWait);
563
+ }
564
+ #endif
559
565
  if (!FBTypeText(textToType, frequency, &error)) {
560
566
  return FBResponseWithStatus([FBCommandStatus invalidElementStateErrorWithMessage:error.description
561
567
  traceback:nil]);
@@ -15,11 +15,11 @@
15
15
  <key>CFBundlePackageType</key>
16
16
  <string>FMWK</string>
17
17
  <key>CFBundleShortVersionString</key>
18
- <string>16.17.0</string>
18
+ <string>16.17.2</string>
19
19
  <key>CFBundleSignature</key>
20
20
  <string>????</string>
21
21
  <key>CFBundleVersion</key>
22
- <string>16.17.0</string>
22
+ <string>16.17.2</string>
23
23
  <key>NSPrincipalClass</key>
24
24
  <string/>
25
25
  </dict>
@@ -60,6 +60,8 @@ typedef NS_ENUM(NSInteger, FBConfigurationKeyboardPreference) {
60
60
 
61
61
  /*! The maximum typing frequency for all typing activities */
62
62
  @property (atomic, assign) NSUInteger maxTypingFrequency;
63
+ /*! Seconds to wait for a hittable key before typing on iOS. 0 disables the wait. */
64
+ @property (atomic, assign) NSTimeInterval keyboardWaitTimeout;
63
65
  @property (atomic, readonly) NSUInteger defaultTypingFrequency;
64
66
 
65
67
  /*! Use singleton test manager proxy */
@@ -343,6 +343,7 @@ static NSString *const axSettingsClassName = @"AXSettings";
343
343
  self.shouldUseCompactResponses = YES;
344
344
  self.elementResponseAttributes = @"type,label";
345
345
  self.maxTypingFrequencyOverride = @(self.defaultTypingFrequency);
346
+ self.keyboardWaitTimeout = 0;
346
347
  self.screenshotQuality = 3;
347
348
  self.useFirstMatch = NO;
348
349
  self.boundElementsByIndex = NO;
@@ -36,6 +36,7 @@ extern NSString* const FB_SETTING_SCREENSHOT_ORIENTATION;
36
36
  extern NSString* const FB_SETTING_WAIT_FOR_IDLE_TIMEOUT;
37
37
  extern NSString* const FB_SETTING_ANIMATION_COOL_OFF_TIMEOUT;
38
38
  extern NSString* const FB_SETTING_MAX_TYPING_FREQUENCY;
39
+ extern NSString* const FB_SETTING_KEYBOARD_WAIT_TIMEOUT;
39
40
  extern NSString* const FB_SETTING_RESPECT_SYSTEM_ALERTS;
40
41
  extern NSString* const FB_SETTING_USE_CLEAR_TEXT_SHORTCUT;
41
42
  extern NSString* const FB_SETTING_LIMIT_XPATH_CONTEXT_SCOPE;
@@ -32,6 +32,7 @@ NSString* const FB_SETTING_SCREENSHOT_ORIENTATION = @"screenshotOrientation";
32
32
  NSString* const FB_SETTING_WAIT_FOR_IDLE_TIMEOUT = @"waitForIdleTimeout";
33
33
  NSString* const FB_SETTING_ANIMATION_COOL_OFF_TIMEOUT = @"animationCoolOffTimeout";
34
34
  NSString* const FB_SETTING_MAX_TYPING_FREQUENCY = @"maxTypingFrequency";
35
+ NSString* const FB_SETTING_KEYBOARD_WAIT_TIMEOUT = @"keyboardWaitTimeout";
35
36
  NSString* const FB_SETTING_RESPECT_SYSTEM_ALERTS = @"respectSystemAlerts";
36
37
  NSString* const FB_SETTING_USE_CLEAR_TEXT_SHORTCUT = @"useClearTextShortcut";
37
38
  NSString* const FB_SETTING_LIMIT_XPATH_CONTEXT_SCOPE = @"limitXPathContextScope";
@@ -8,6 +8,8 @@
8
8
 
9
9
  #import "FBSettingsHandler.h"
10
10
 
11
+ #import <math.h>
12
+
11
13
  #import "FBActiveAppDetectionPoint.h"
12
14
  #import "FBClassChainQueryParser.h"
13
15
  #import "FBCommandStatus.h"
@@ -35,6 +37,7 @@ static NSSet<NSString *> *FBNilClearableSettingKeys(void)
35
37
  FB_SETTING_DISMISS_ALERT_BUTTON_SELECTOR,
36
38
  FB_SETTING_AUTO_CLICK_ALERT_SELECTOR,
37
39
  FB_SETTING_CURRENT_DISPLAY_ID,
40
+ FB_SETTING_KEYBOARD_WAIT_TIMEOUT,
38
41
  nil];
39
42
  });
40
43
  return keys;
@@ -160,6 +163,24 @@ static NSSet<NSString *> *FBNilClearableSettingKeys(void)
160
163
  FBConfiguration.sharedInstance.maxTypingFrequency = [value unsignedIntegerValue];
161
164
  return nil;
162
165
  };
166
+ map[FB_SETTING_KEYBOARD_WAIT_TIMEOUT] = ^FBCommandStatus *(FBSession *session, id value) {
167
+ if (nil == value) {
168
+ FBConfiguration.sharedInstance.keyboardWaitTimeout = 0;
169
+ return nil;
170
+ }
171
+ if (![value isKindOfClass:NSNumber.class]
172
+ || CFGetTypeID((__bridge CFTypeRef)value) == CFBooleanGetTypeID()) {
173
+ return [FBCommandStatus invalidArgumentErrorWithMessage:@"keyboardWaitTimeout must be a non-negative number of seconds"
174
+ traceback:nil];
175
+ }
176
+ double timeout = [(NSNumber *)value doubleValue];
177
+ if (timeout < 0 || !isfinite(timeout)) {
178
+ return [FBCommandStatus invalidArgumentErrorWithMessage:@"keyboardWaitTimeout must be a non-negative number of seconds"
179
+ traceback:nil];
180
+ }
181
+ FBConfiguration.sharedInstance.keyboardWaitTimeout = timeout;
182
+ return nil;
183
+ };
163
184
  map[FB_SETTING_USE_CLEAR_TEXT_SHORTCUT] = ^FBCommandStatus *(FBSession *session, id value) {
164
185
  FBConfiguration.sharedInstance.useClearTextShortcut = [value boolValue];
165
186
  return nil;
@@ -304,6 +325,9 @@ static NSSet<NSString *> *FBNilClearableSettingKeys(void)
304
325
  map[FB_SETTING_MAX_TYPING_FREQUENCY] = ^id(FBSession *session) {
305
326
  return @(FBConfiguration.sharedInstance.maxTypingFrequency);
306
327
  };
328
+ map[FB_SETTING_KEYBOARD_WAIT_TIMEOUT] = ^id(FBSession *session) {
329
+ return @(FBConfiguration.sharedInstance.keyboardWaitTimeout);
330
+ };
307
331
  map[FB_SETTING_RESPECT_SYSTEM_ALERTS] = ^id(FBSession *session) {
308
332
  return @(FBConfiguration.sharedInstance.shouldRespectSystemAlerts);
309
333
  };
@@ -8,6 +8,7 @@
8
8
 
9
9
  #import <XCTest/XCTest.h>
10
10
 
11
+ #import "FBConfiguration.h"
11
12
  #import "FBIntegrationTestCase.h"
12
13
  #import "XCUIElement.h"
13
14
  #import "XCUIElement+FBTyping.h"
@@ -24,6 +25,12 @@
24
25
  [self goToAttributesPage];
25
26
  }
26
27
 
28
+ - (void)tearDown
29
+ {
30
+ FBConfiguration.sharedInstance.keyboardWaitTimeout = 0;
31
+ [super tearDown];
32
+ }
33
+
27
34
  - (void)testTextTyping
28
35
  {
29
36
  NSString *text = @"Happy typing";
@@ -49,6 +56,32 @@
49
56
  XCTAssertEqualObjects(textField.value, expectedText);
50
57
  }
51
58
 
59
+ - (void)testTextTypingImmediatelyAfterFocus
60
+ {
61
+ // The field is a storyboard UIKit text field. This passes with the pause off,
62
+ // which is the default, and it does not reproduce a dropped character.
63
+ NSString *text = @"TheQuickBrownFox123!";
64
+ XCUIElement *textField = self.testedApplication.textFields[@"aIdentifier"];
65
+ [textField tap];
66
+ NSError *error;
67
+ XCTAssertTrue([textField fb_typeText:text shouldClear:NO error:&error]);
68
+ XCTAssertNil(error);
69
+ XCTAssertEqualObjects(textField.value, text);
70
+ }
71
+
72
+ - (void)testTextTypingWithKeyboardWaitTimeout
73
+ {
74
+ // The field is a storyboard UIKit text field. This does not reproduce a dropped character.
75
+ FBConfiguration.sharedInstance.keyboardWaitTimeout = 0.5;
76
+ NSString *text = @"TheQuickBrownFox123!";
77
+ XCUIElement *textField = self.testedApplication.textFields[@"aIdentifier"];
78
+ [textField tap];
79
+ NSError *error;
80
+ XCTAssertTrue([textField fb_typeText:text shouldClear:NO error:&error]);
81
+ XCTAssertNil(error);
82
+ XCTAssertEqualObjects(textField.value, text);
83
+ }
84
+
52
85
  - (void)testTextClearing
53
86
  {
54
87
  XCUIElement *textField = self.testedApplication.textFields[@"aIdentifier"];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "appium-webdriveragent",
3
- "version": "16.17.0",
3
+ "version": "16.17.2",
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": "3369e1484f3cb822b22f2fd4c06ddc9c3d48c0a6"
88
+ "gitHead": "e44d107586127a4b666f81688dbcd4bcf61b6cd3"
89
89
  }