appium-webdriveragent 8.3.1 → 8.4.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 +7 -0
- package/WebDriverAgentLib/Commands/FBCustomCommands.m +16 -2
- package/WebDriverAgentLib/Info.plist +2 -2
- package/WebDriverAgentLib/Utilities/FBScreen.h +0 -5
- package/WebDriverAgentLib/Utilities/FBScreen.m +0 -13
- package/WebDriverAgentTests/IntegrationTests/FBScreenTests.m +0 -7
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
## [8.4.0](https://github.com/appium/WebDriverAgent/compare/v8.3.1...v8.4.0) (2024-04-01)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* add system screen size/width in the system info endpoint ([#881](https://github.com/appium/WebDriverAgent/issues/881)) ([5ebc71c](https://github.com/appium/WebDriverAgent/commit/5ebc71c6ca2b364d44a44716e794885f8d3b6d9c))
|
|
7
|
+
|
|
1
8
|
## [8.3.1](https://github.com/appium/WebDriverAgent/compare/v8.3.0...v8.3.1) (2024-03-31)
|
|
2
9
|
|
|
3
10
|
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
#import "FBConfiguration.h"
|
|
16
16
|
#import "FBKeyboard.h"
|
|
17
17
|
#import "FBNotificationsHelper.h"
|
|
18
|
+
#import "FBMathUtils.h"
|
|
18
19
|
#import "FBPasteboard.h"
|
|
19
20
|
#import "FBResponsePayload.h"
|
|
20
21
|
#import "FBRoute.h"
|
|
@@ -48,6 +49,7 @@
|
|
|
48
49
|
[[FBRoute GET:@"/wda/locked"].withoutSession respondWithTarget:self action:@selector(handleIsLocked:)],
|
|
49
50
|
[[FBRoute GET:@"/wda/locked"] respondWithTarget:self action:@selector(handleIsLocked:)],
|
|
50
51
|
[[FBRoute GET:@"/wda/screen"] respondWithTarget:self action:@selector(handleGetScreen:)],
|
|
52
|
+
[[FBRoute GET:@"/wda/screen"].withoutSession respondWithTarget:self action:@selector(handleGetScreen:)],
|
|
51
53
|
[[FBRoute GET:@"/wda/activeAppInfo"] respondWithTarget:self action:@selector(handleActiveAppInfo:)],
|
|
52
54
|
[[FBRoute GET:@"/wda/activeAppInfo"].withoutSession respondWithTarget:self action:@selector(handleActiveAppInfo:)],
|
|
53
55
|
#if !TARGET_OS_TV // tvOS does not provide relevant APIs
|
|
@@ -134,10 +136,22 @@
|
|
|
134
136
|
|
|
135
137
|
+ (id<FBResponsePayload>)handleGetScreen:(FBRouteRequest *)request
|
|
136
138
|
{
|
|
137
|
-
|
|
138
|
-
|
|
139
|
+
XCUIApplication *app = XCUIApplication.fb_systemApplication;
|
|
140
|
+
|
|
141
|
+
XCUIElement *mainStatusBar = app.statusBars.allElementsBoundByIndex.firstObject;
|
|
142
|
+
CGSize statusBarSize = (nil == mainStatusBar) ? CGSizeZero : mainStatusBar.frame.size;
|
|
143
|
+
|
|
144
|
+
#if TARGET_OS_TV
|
|
145
|
+
CGSize screenSize = app.frame.size;
|
|
146
|
+
#else
|
|
147
|
+
CGSize screenSize = FBAdjustDimensionsForApplication(app.wdFrame.size, app.interfaceOrientation);
|
|
148
|
+
#endif
|
|
149
|
+
|
|
139
150
|
return FBResponseWithObject(
|
|
140
151
|
@{
|
|
152
|
+
@"screenSize":@{@"width": @(screenSize.width),
|
|
153
|
+
@"height": @(screenSize.height)
|
|
154
|
+
},
|
|
141
155
|
@"statusBarSize": @{@"width": @(statusBarSize.width),
|
|
142
156
|
@"height": @(statusBarSize.height),
|
|
143
157
|
},
|
|
@@ -15,11 +15,11 @@
|
|
|
15
15
|
<key>CFBundlePackageType</key>
|
|
16
16
|
<string>FMWK</string>
|
|
17
17
|
<key>CFBundleShortVersionString</key>
|
|
18
|
-
<string>8.
|
|
18
|
+
<string>8.4.0</string>
|
|
19
19
|
<key>CFBundleSignature</key>
|
|
20
20
|
<string>????</string>
|
|
21
21
|
<key>CFBundleVersion</key>
|
|
22
|
-
<string>8.
|
|
22
|
+
<string>8.4.0</string>
|
|
23
23
|
<key>NSPrincipalClass</key>
|
|
24
24
|
<string/>
|
|
25
25
|
</dict>
|
|
@@ -18,11 +18,6 @@ NS_ASSUME_NONNULL_BEGIN
|
|
|
18
18
|
*/
|
|
19
19
|
+ (double)scale;
|
|
20
20
|
|
|
21
|
-
/**
|
|
22
|
-
The absolute size of application's status bar or CGSizeZero if it's hidden or does not exist
|
|
23
|
-
*/
|
|
24
|
-
+ (CGSize)statusBarSizeForApplication:(XCUIApplication *)application;
|
|
25
|
-
|
|
26
21
|
@end
|
|
27
22
|
|
|
28
23
|
NS_ASSUME_NONNULL_END
|
|
@@ -19,17 +19,4 @@
|
|
|
19
19
|
return [XCUIScreen.mainScreen scale];
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
+ (CGSize)statusBarSizeForApplication:(XCUIApplication *)application
|
|
23
|
-
{
|
|
24
|
-
XCUIApplication *app = XCUIApplication.fb_systemApplication;
|
|
25
|
-
// Since iOS 13 the status bar is no longer part of the application, it’s part of the SpringBoard
|
|
26
|
-
XCUIElement *mainStatusBar = app.statusBars.allElementsBoundByIndex.firstObject;
|
|
27
|
-
if (nil == mainStatusBar) {
|
|
28
|
-
return CGSizeZero;
|
|
29
|
-
}
|
|
30
|
-
CGSize result = mainStatusBar.frame.size;
|
|
31
|
-
// Workaround for https://github.com/appium/appium/issues/15961
|
|
32
|
-
return CGSizeMake(MAX(result.width, result.height), MIN(result.width, result.height));
|
|
33
|
-
}
|
|
34
|
-
|
|
35
22
|
@end
|
|
@@ -28,12 +28,5 @@
|
|
|
28
28
|
XCTAssertTrue([FBScreen scale] >= 2);
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
- (void)testStatusBarSize
|
|
32
|
-
{
|
|
33
|
-
CGSize statusBarSize = [FBScreen statusBarSizeForApplication:self.testedApplication];
|
|
34
|
-
BOOL statusBarSizeIsZero = CGSizeEqualToSize(CGSizeZero, statusBarSize);
|
|
35
|
-
XCTAssertFalse(statusBarSizeIsZero);
|
|
36
|
-
}
|
|
37
|
-
|
|
38
31
|
@end
|
|
39
32
|
|