appium-webdriveragent 5.8.6 → 5.9.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 CHANGED
@@ -1,3 +1,17 @@
1
+ ## [5.9.0](https://github.com/appium/WebDriverAgent/compare/v5.8.7...v5.9.0) (2023-09-22)
2
+
3
+
4
+ ### Features
5
+
6
+ * do not get active process information in a new session request ([#774](https://github.com/appium/WebDriverAgent/issues/774)) ([2784ce4](https://github.com/appium/WebDriverAgent/commit/2784ce440f8b5ab9710db08d9ffda704697ac07c))
7
+
8
+ ## [5.8.7](https://github.com/appium/WebDriverAgent/compare/v5.8.6...v5.8.7) (2023-09-22)
9
+
10
+
11
+ ### Miscellaneous Chores
12
+
13
+ * tweak device in currentCapabilities ([#773](https://github.com/appium/WebDriverAgent/issues/773)) ([8481b02](https://github.com/appium/WebDriverAgent/commit/8481b02fc84de1147e1254ea7fd114f8735b0226))
14
+
1
15
  ## [5.8.6](https://github.com/appium/WebDriverAgent/compare/v5.8.5...v5.8.6) (2023-09-21)
2
16
 
3
17
 
@@ -257,7 +257,8 @@
257
257
  #endif
258
258
  @"ip" : [XCUIDevice sharedDevice].fb_wifiIPAddress ?: [NSNull null]
259
259
  },
260
- @"build" : buildInfo.copy
260
+ @"build" : buildInfo.copy,
261
+ @"device": [self.class deviceNameByUserInterfaceIdiom:[UIDevice currentDevice].userInterfaceIdiom]
261
262
  }
262
263
  );
263
264
  }
@@ -409,6 +410,10 @@
409
410
  ];
410
411
  }
411
412
 
413
+ /**
414
+ Return current session information.
415
+ This response does not have any active application information.
416
+ */
412
417
  + (NSDictionary *)sessionInformation
413
418
  {
414
419
  return
@@ -418,17 +423,29 @@
418
423
  };
419
424
  }
420
425
 
426
+ /*
427
+ Return the device kind as lower case
428
+ */
429
+ + (NSString *)deviceNameByUserInterfaceIdiom:(UIUserInterfaceIdiom) userInterfaceIdiom
430
+ {
431
+ if (userInterfaceIdiom == UIUserInterfaceIdiomPad) {
432
+ return @"ipad";
433
+ } else if (userInterfaceIdiom == UIUserInterfaceIdiomTV) {
434
+ return @"apple tv";
435
+ } else if (userInterfaceIdiom == UIUserInterfaceIdiomPhone) {
436
+ return @"iphone";
437
+ }
438
+ // CarPlay, Mac, Vision UI or unknown are possible
439
+ return @"Unknown";
440
+
441
+ }
442
+
421
443
  + (NSDictionary *)currentCapabilities
422
444
  {
423
- FBApplication *application = [FBSession activeSession].activeApplication;
424
- // to log the info in the system
425
- [FBLogger logFmt:@"Current active application bundle id is %@", application.bundleID];
426
445
  return
427
446
  @{
428
- @"device": ([UIDevice currentDevice].userInterfaceIdiom == UIUserInterfaceIdiomPad) ? @"ipad" : @"iphone",
429
- @"sdkVersion": [[UIDevice currentDevice] systemVersion],
430
- @"browserName": application.label ?: [NSNull null],
431
- @"CFBundleIdentifier": application.bundleID ?: [NSNull null],
447
+ @"device": [self.class deviceNameByUserInterfaceIdiom:[UIDevice currentDevice].userInterfaceIdiom],
448
+ @"sdkVersion": [[UIDevice currentDevice] systemVersion]
432
449
  };
433
450
  }
434
451
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "appium-webdriveragent",
3
- "version": "5.8.6",
3
+ "version": "5.9.0",
4
4
  "description": "Package bundling WebDriverAgent",
5
5
  "main": "./build/index.js",
6
6
  "scripts": {