appium-webdriveragent 4.9.4 → 4.10.1

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.
@@ -226,7 +226,7 @@
226
226
  if (nil == result) {
227
227
  return FBResponseWithUnknownError(error);
228
228
  }
229
- return FBResponseWithObject([result base64EncodedStringWithOptions:NSDataBase64Encoding64CharacterLineLength]);
229
+ return FBResponseWithObject([result base64EncodedStringWithOptions:0]);
230
230
  }
231
231
 
232
232
  + (id<FBResponsePayload>)handleGetBatteryInfo:(FBRouteRequest *)request
@@ -55,6 +55,7 @@
55
55
  return
56
56
  @[
57
57
  [[FBRoute GET:@"/window/size"] respondWithTarget:self action:@selector(handleGetWindowSize:)],
58
+ [[FBRoute GET:@"/window/size"].withoutSession respondWithTarget:self action:@selector(handleGetWindowSize:)],
58
59
  [[FBRoute GET:@"/element/:uuid/enabled"] respondWithTarget:self action:@selector(handleGetEnabled:)],
59
60
  [[FBRoute GET:@"/element/:uuid/rect"] respondWithTarget:self action:@selector(handleGetRect:)],
60
61
  [[FBRoute GET:@"/element/:uuid/attribute/:name"] respondWithTarget:self action:@selector(handleGetAttribute:)],
@@ -571,11 +572,13 @@
571
572
 
572
573
  + (id<FBResponsePayload>)handleGetWindowSize:(FBRouteRequest *)request
573
574
  {
575
+ XCUIApplication *app = request.session.activeApplication ?: FBApplication.fb_activeApplication;
576
+
574
577
  #if TARGET_OS_TV
575
- CGSize screenSize = request.session.activeApplication.frame.size;
578
+ CGSize screenSize = app.frame.size;
576
579
  #else
577
- CGRect frame = request.session.activeApplication.wdFrame;
578
- CGSize screenSize = FBAdjustDimensionsForApplication(frame.size, request.session.activeApplication.interfaceOrientation);
580
+ CGRect frame = app.wdFrame;
581
+ CGSize screenSize = FBAdjustDimensionsForApplication(frame.size, app.interfaceOrientation);
579
582
  #endif
580
583
  return FBResponseWithObject(@{
581
584
  @"width": @(screenSize.width),
@@ -593,7 +596,7 @@
593
596
  return FBResponseWithStatus([FBCommandStatus unableToCaptureScreenErrorWithMessage:error.description
594
597
  traceback:nil]);
595
598
  }
596
- NSString *screenshot = [screenshotData base64EncodedStringWithOptions:NSDataBase64Encoding64CharacterLineLength];
599
+ NSString *screenshot = [screenshotData base64EncodedStringWithOptions:0];
597
600
  return FBResponseWithObject(screenshot);
598
601
  }
599
602
 
@@ -34,7 +34,7 @@
34
34
  if (nil == screenshotData) {
35
35
  return FBResponseWithStatus([FBCommandStatus unableToCaptureScreenErrorWithMessage:error.description traceback:nil]);
36
36
  }
37
- NSString *screenshot = [screenshotData base64EncodedStringWithOptions:NSDataBase64Encoding64CharacterLineLength];
37
+ NSString *screenshot = [screenshotData base64EncodedStringWithOptions:0];
38
38
  return FBResponseWithObject(screenshot);
39
39
  }
40
40
 
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "appium-webdriveragent",
3
- "version": "4.9.4",
3
+ "version": "4.10.1",
4
4
  "description": "Package bundling WebDriverAgent",
5
5
  "main": "./build/index.js",
6
6
  "scripts": {