appium-webdriveragent 16.16.1 → 16.16.3
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.16.3](https://github.com/appium/appium-ios/compare/appium-webdriveragent@16.16.2...appium-webdriveragent@16.16.3) (2026-10-19)
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* **webdriveragent:** shorten lock button press on iOS 27 ([#91](https://github.com/appium/appium-ios/issues/91)) ([e002283](https://github.com/appium/appium-ios/commit/e002283d4b26738b0dae1200a3a639e611101d79))
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
## [16.16.2](https://github.com/appium/appium-ios/compare/appium-webdriveragent@16.16.1...appium-webdriveragent@16.16.2) (2026-10-18)
|
|
14
|
+
|
|
15
|
+
### Bug Fixes
|
|
16
|
+
|
|
17
|
+
* **webdriveragent:** use Home to background watchOS apps ([#84](https://github.com/appium/appium-ios/issues/84)) ([b1dd12e](https://github.com/appium/appium-ios/commit/b1dd12e93d8eb0f6acc0a0addaf8733b2bfb0b19))
|
|
18
|
+
|
|
19
|
+
|
|
6
20
|
## [16.16.1](https://github.com/appium/appium-ios/compare/appium-webdriveragent@16.16.0...appium-webdriveragent@16.16.1) (2026-10-18)
|
|
7
21
|
|
|
8
22
|
### Bug Fixes
|
|
@@ -22,10 +22,15 @@
|
|
|
22
22
|
#import "FBXCodeCompatibility.h"
|
|
23
23
|
#import "FBXCTestDaemonsProxy.h"
|
|
24
24
|
#import "XCUIDevice.h"
|
|
25
|
+
#import "XCUIApplication.h"
|
|
25
26
|
|
|
26
27
|
static const NSTimeInterval FBHomeButtonCoolOffTime = 1.;
|
|
27
28
|
static const NSTimeInterval FBScreenLockTimeout = 5.;
|
|
28
29
|
|
|
30
|
+
#if TARGET_OS_WATCH
|
|
31
|
+
static NSString *const FBClockFaceBundleId = @"com.apple.clockface";
|
|
32
|
+
#endif
|
|
33
|
+
|
|
29
34
|
#if TARGET_OS_TV
|
|
30
35
|
NSDictionary<NSString *, NSNumber *> *fb_availableButtonNames(void) {
|
|
31
36
|
static dispatch_once_t onceToken;
|
|
@@ -138,11 +143,36 @@ static bool fb_isLocked;
|
|
|
138
143
|
{
|
|
139
144
|
#if TARGET_OS_TV
|
|
140
145
|
return [self fb_goToHomescreenOnTVWithError:error];
|
|
146
|
+
#elif TARGET_OS_WATCH
|
|
147
|
+
return [self fb_goToHomescreenOnWatchWithError:error];
|
|
141
148
|
#else
|
|
142
149
|
return [XCUIApplication fb_switchToSystemApplicationWithError:error];
|
|
143
150
|
#endif
|
|
144
151
|
}
|
|
145
152
|
|
|
153
|
+
#if TARGET_OS_WATCH
|
|
154
|
+
- (BOOL)fb_goToHomescreenOnWatchWithError:(NSError **)error
|
|
155
|
+
{
|
|
156
|
+
// Carousel rejects launch/activate requests on watchOS 27.0.
|
|
157
|
+
XCUIApplication *foregroundApp = XCUIApplication.fb_activeApplication;
|
|
158
|
+
// The watch face is a separate foreground application from Carousel.
|
|
159
|
+
if ([foregroundApp.bundleID isEqualToString:FBClockFaceBundleId]
|
|
160
|
+
|| [foregroundApp fb_isSameAppAs:XCUIApplication.fb_systemApplication]) {
|
|
161
|
+
return YES;
|
|
162
|
+
}
|
|
163
|
+
@try {
|
|
164
|
+
[self pressButton:XCUIDeviceButtonHome];
|
|
165
|
+
} @catch (NSException *exception) {
|
|
166
|
+
return [[[FBErrorBuilder alloc] withDescription:exception.reason] buildError:error];
|
|
167
|
+
}
|
|
168
|
+
return [[[[FBRunLoopSpinner new] timeout:5]
|
|
169
|
+
timeoutErrorMessage:@"Timed out while waiting for the home screen"]
|
|
170
|
+
spinUntilTrue:^BOOL{
|
|
171
|
+
return foregroundApp.state != XCUIApplicationStateRunningForeground;
|
|
172
|
+
} error:error];
|
|
173
|
+
}
|
|
174
|
+
#endif
|
|
175
|
+
|
|
146
176
|
#if TARGET_OS_TV
|
|
147
177
|
- (BOOL)fb_goToHomescreenOnTVWithError:(NSError **)error
|
|
148
178
|
{
|
|
@@ -173,10 +203,12 @@ static bool fb_isLocked;
|
|
|
173
203
|
[self pressLockButton];
|
|
174
204
|
#else
|
|
175
205
|
if (SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(@"27.0")) {
|
|
176
|
-
// iOS 27: pressLockButton no longer locks; use a
|
|
206
|
+
// iOS 27: pressLockButton no longer locks; use a short IOHID Power press.
|
|
207
|
+
// A 0.5s hold can invoke Siri instead of locking the screen.
|
|
208
|
+
const NSTimeInterval duration = 0.2;
|
|
177
209
|
if (![self fb_performIOHIDEventWithPage:0x0C
|
|
178
210
|
usage:0x30
|
|
179
|
-
duration:
|
|
211
|
+
duration:duration
|
|
180
212
|
error:error]) {
|
|
181
213
|
return NO;
|
|
182
214
|
}
|
|
@@ -15,11 +15,11 @@
|
|
|
15
15
|
<key>CFBundlePackageType</key>
|
|
16
16
|
<string>FMWK</string>
|
|
17
17
|
<key>CFBundleShortVersionString</key>
|
|
18
|
-
<string>16.16.
|
|
18
|
+
<string>16.16.3</string>
|
|
19
19
|
<key>CFBundleSignature</key>
|
|
20
20
|
<string>????</string>
|
|
21
21
|
<key>CFBundleVersion</key>
|
|
22
|
-
<string>16.16.
|
|
22
|
+
<string>16.16.3</string>
|
|
23
23
|
<key>NSPrincipalClass</key>
|
|
24
24
|
<string/>
|
|
25
25
|
</dict>
|
|
@@ -34,4 +34,16 @@ final class WDAAppLifecycleIntegrationTests: WDAWatchInProcessTestCase {
|
|
|
34
34
|
app.activate()
|
|
35
35
|
XCTAssertEqual(app.state, .runningForeground)
|
|
36
36
|
}
|
|
37
|
+
func testHomeAndDeactivate() throws {
|
|
38
|
+
try XCUIDevice.shared.fb_goToHomescreen()
|
|
39
|
+
XCTAssertNotEqual(app.state, .runningForeground)
|
|
40
|
+
try XCUIDevice.shared.fb_goToHomescreen()
|
|
41
|
+
XCTAssertNotEqual(app.state, .runningForeground)
|
|
42
|
+
for duration in [0.0, 2.0] {
|
|
43
|
+
app.activate()
|
|
44
|
+
try app.fb_deactivate(withDuration: duration)
|
|
45
|
+
XCTAssertEqual(app.state, .runningForeground)
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
37
49
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "appium-webdriveragent",
|
|
3
|
-
"version": "16.16.
|
|
3
|
+
"version": "16.16.3",
|
|
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": "
|
|
88
|
+
"gitHead": "9a31ba1944198c3a718165153394f53ab6b2b63f"
|
|
89
89
|
}
|