@applitools/driver 1.4.8 → 1.4.9

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
@@ -3,6 +3,10 @@
3
3
  ## Unreleased
4
4
 
5
5
 
6
+ ## 1.4.9 - 2022/1/12
7
+
8
+ - handle case with `spec.getCookies` throws an error when trying to get cookies of the browser
9
+
6
10
  ## 1.4.8 - 2022/1/5
7
11
 
8
12
  - handle legacy appium capabilities
package/dist/driver.js CHANGED
@@ -484,7 +484,13 @@ class Driver {
484
484
  var _a, _b, _c;
485
485
  if (this.isNative || !this.features.allCookies)
486
486
  return [];
487
- return (_c = (_b = (_a = this._spec).getCookies) === null || _b === void 0 ? void 0 : _b.call(_a, this.target)) !== null && _c !== void 0 ? _c : [];
487
+ try {
488
+ return (_c = (await ((_b = (_a = this._spec).getCookies) === null || _b === void 0 ? void 0 : _b.call(_a, this.target)))) !== null && _c !== void 0 ? _c : [];
489
+ }
490
+ catch (error) {
491
+ this._driverInfo.features.allCookies = false;
492
+ throw error;
493
+ }
488
494
  }
489
495
  async getTitle() {
490
496
  if (this.isNative)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@applitools/driver",
3
- "version": "1.4.8",
3
+ "version": "1.4.9",
4
4
  "description": "Applitools universal framework wrapper",
5
5
  "keywords": [
6
6
  "applitools",