appium-webdriveragent 9.6.0 → 9.6.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 +12 -0
- package/WebDriverAgentLib/Commands/FBElementCommands.m +16 -10
- package/WebDriverAgentLib/Commands/FBSessionCommands.m +1 -1
- package/WebDriverAgentLib/Info.plist +2 -2
- package/WebDriverAgentLib/Routing/FBWebServer.m +1 -1
- package/WebDriverAgentLib/Utilities/FBConfiguration.h +2 -2
- package/WebDriverAgentLib/Utilities/FBConfiguration.m +3 -3
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
## [9.6.2](https://github.com/appium/WebDriverAgent/compare/v9.6.1...v9.6.2) (2025-05-01)
|
|
2
|
+
|
|
3
|
+
### Bug Fixes
|
|
4
|
+
|
|
5
|
+
* release element screenshot data ([#1013](https://github.com/appium/WebDriverAgent/issues/1013)) ([a85f327](https://github.com/appium/WebDriverAgent/commit/a85f3271991556941234fbc888528051b1569db1))
|
|
6
|
+
|
|
7
|
+
## [9.6.1](https://github.com/appium/WebDriverAgent/compare/v9.6.0...v9.6.1) (2025-04-22)
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* allow setting precise resolution for the MJPEG stream ([#1009](https://github.com/appium/WebDriverAgent/issues/1009)) ([3f86eda](https://github.com/appium/WebDriverAgent/commit/3f86edafda42d955929f7cca870e2b8da54ae930))
|
|
12
|
+
|
|
1
13
|
## [9.6.0](https://github.com/appium/WebDriverAgent/compare/v9.5.2...v9.6.0) (2025-04-20)
|
|
2
14
|
|
|
3
15
|
### Features
|
|
@@ -562,17 +562,23 @@
|
|
|
562
562
|
|
|
563
563
|
+ (id<FBResponsePayload>)handleElementScreenshot:(FBRouteRequest *)request
|
|
564
564
|
{
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
565
|
+
@autoreleasepool {
|
|
566
|
+
FBElementCache *elementCache = request.session.elementCache;
|
|
567
|
+
XCUIElement *element = [elementCache elementForUUID:(NSString *)request.parameters[@"uuid"]
|
|
568
|
+
checkStaleness:YES];
|
|
569
|
+
NSData *screenshotData = nil;
|
|
570
|
+
@autoreleasepool {
|
|
571
|
+
screenshotData = [element.screenshot PNGRepresentation];
|
|
572
|
+
if (nil == screenshotData) {
|
|
573
|
+
NSString *errMsg = [NSString stringWithFormat:@"Cannot take a screenshot of %@", element.description];
|
|
574
|
+
return FBResponseWithStatus([FBCommandStatus unableToCaptureScreenErrorWithMessage:errMsg
|
|
575
|
+
traceback:nil]);
|
|
576
|
+
}
|
|
577
|
+
}
|
|
578
|
+
NSString *screenshot = [screenshotData base64EncodedStringWithOptions:0];
|
|
579
|
+
screenshotData = nil;
|
|
580
|
+
return FBResponseWithObject(screenshot);
|
|
573
581
|
}
|
|
574
|
-
NSString *screenshot = [screenshotData base64EncodedStringWithOptions:0];
|
|
575
|
-
return FBResponseWithObject(screenshot);
|
|
576
582
|
}
|
|
577
583
|
|
|
578
584
|
|
|
@@ -383,7 +383,7 @@
|
|
|
383
383
|
[FBConfiguration setScreenshotQuality:[[settings objectForKey:FB_SETTING_SCREENSHOT_QUALITY] unsignedIntegerValue]];
|
|
384
384
|
}
|
|
385
385
|
if (nil != [settings objectForKey:FB_SETTING_MJPEG_SCALING_FACTOR]) {
|
|
386
|
-
[FBConfiguration setMjpegScalingFactor:[[settings objectForKey:FB_SETTING_MJPEG_SCALING_FACTOR]
|
|
386
|
+
[FBConfiguration setMjpegScalingFactor:[[settings objectForKey:FB_SETTING_MJPEG_SCALING_FACTOR] floatValue]];
|
|
387
387
|
}
|
|
388
388
|
if (nil != [settings objectForKey:FB_SETTING_MJPEG_FIX_ORIENTATION]) {
|
|
389
389
|
[FBConfiguration setMjpegShouldFixOrientation:[[settings objectForKey:FB_SETTING_MJPEG_FIX_ORIENTATION] boolValue]];
|
|
@@ -15,11 +15,11 @@
|
|
|
15
15
|
<key>CFBundlePackageType</key>
|
|
16
16
|
<string>FMWK</string>
|
|
17
17
|
<key>CFBundleShortVersionString</key>
|
|
18
|
-
<string>9.6.
|
|
18
|
+
<string>9.6.2</string>
|
|
19
19
|
<key>CFBundleSignature</key>
|
|
20
20
|
<string>????</string>
|
|
21
21
|
<key>CFBundleVersion</key>
|
|
22
|
-
<string>9.6.
|
|
22
|
+
<string>9.6.2</string>
|
|
23
23
|
<key>NSPrincipalClass</key>
|
|
24
24
|
<string/>
|
|
25
25
|
</dict>
|
|
@@ -142,7 +142,7 @@ static NSString *const FBServerURLEndMarker = @"<-ServerURLHere";
|
|
|
142
142
|
NSDictionary *env = NSProcessInfo.processInfo.environment;
|
|
143
143
|
NSString *scalingFactor = [env objectForKey:@"MJPEG_SCALING_FACTOR"];
|
|
144
144
|
if (scalingFactor != nil && [scalingFactor length] > 0) {
|
|
145
|
-
[FBConfiguration setMjpegScalingFactor:[scalingFactor
|
|
145
|
+
[FBConfiguration setMjpegScalingFactor:[scalingFactor floatValue]];
|
|
146
146
|
}
|
|
147
147
|
NSString *screenshotQuality = [env objectForKey:@"MJPEG_SERVER_SCREENSHOT_QUALITY"];
|
|
148
148
|
if (screenshotQuality != nil && [screenshotQuality length] > 0) {
|
|
@@ -136,8 +136,8 @@ extern NSString *const FBSnapshotMaxDepthKey;
|
|
|
136
136
|
! Setting this to a value less than 100, especially together with orientation fixing enabled
|
|
137
137
|
! may lead to WDA process termination because of an excessive CPU usage.
|
|
138
138
|
*/
|
|
139
|
-
+ (
|
|
140
|
-
+ (void)setMjpegScalingFactor:(
|
|
139
|
+
+ (CGFloat)mjpegScalingFactor;
|
|
140
|
+
+ (void)setMjpegScalingFactor:(CGFloat)scalingFactor;
|
|
141
141
|
|
|
142
142
|
/**
|
|
143
143
|
YES if verbose logging is enabled. NO otherwise.
|
|
@@ -37,7 +37,7 @@ static BOOL FBShouldUseTestManagerForVisibilityDetection = NO;
|
|
|
37
37
|
static BOOL FBShouldUseSingletonTestManager = YES;
|
|
38
38
|
static BOOL FBShouldRespectSystemAlerts = NO;
|
|
39
39
|
|
|
40
|
-
static
|
|
40
|
+
static CGFloat FBMjpegScalingFactor = 100.0;
|
|
41
41
|
static BOOL FBMjpegShouldFixOrientation = NO;
|
|
42
42
|
static NSUInteger FBMjpegServerScreenshotQuality = 25;
|
|
43
43
|
static NSUInteger FBMjpegServerFramerate = 10;
|
|
@@ -149,12 +149,12 @@ static UIInterfaceOrientation FBScreenshotOrientation;
|
|
|
149
149
|
return DefaultMjpegServerPort;
|
|
150
150
|
}
|
|
151
151
|
|
|
152
|
-
+ (
|
|
152
|
+
+ (CGFloat)mjpegScalingFactor
|
|
153
153
|
{
|
|
154
154
|
return FBMjpegScalingFactor;
|
|
155
155
|
}
|
|
156
156
|
|
|
157
|
-
+ (void)setMjpegScalingFactor:(
|
|
157
|
+
+ (void)setMjpegScalingFactor:(CGFloat)scalingFactor {
|
|
158
158
|
FBMjpegScalingFactor = scalingFactor;
|
|
159
159
|
}
|
|
160
160
|
|