appium-webdriveragent 16.16.1 → 16.16.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,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.16.2](https://github.com/appium/appium-ios/compare/appium-webdriveragent@16.16.1...appium-webdriveragent@16.16.2) (2026-10-18)
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* **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))
|
|
11
|
+
|
|
12
|
+
|
|
6
13
|
## [16.16.1](https://github.com/appium/appium-ios/compare/appium-webdriveragent@16.16.0...appium-webdriveragent@16.16.1) (2026-10-18)
|
|
7
14
|
|
|
8
15
|
### 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
|
{
|
|
@@ -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.2</string>
|
|
19
19
|
<key>CFBundleSignature</key>
|
|
20
20
|
<string>????</string>
|
|
21
21
|
<key>CFBundleVersion</key>
|
|
22
|
-
<string>16.16.
|
|
22
|
+
<string>16.16.2</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.2",
|
|
4
4
|
"description": "Package bundling WebDriverAgent",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Appium",
|
|
@@ -84,6 +84,5 @@
|
|
|
84
84
|
"engines": {
|
|
85
85
|
"node": "^20.19.0 || ^22.12.0 || >=24.0.0",
|
|
86
86
|
"npm": ">=10"
|
|
87
|
-
}
|
|
88
|
-
"gitHead": "396c3ea39a609981f73330cc27d58bee33258a6e"
|
|
87
|
+
}
|
|
89
88
|
}
|