appium-webdriveragent 4.9.3 → 4.10.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.
@@ -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),
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "appium-webdriveragent",
3
- "version": "4.9.3",
3
+ "version": "4.10.0",
4
4
  "description": "Package bundling WebDriverAgent",
5
5
  "main": "./build/index.js",
6
6
  "scripts": {