@applitools/spec-driver-webdriver 1.0.55 → 1.0.56

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,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.0.56](https://github.com/applitools/eyes.sdk.javascript1/compare/js/spec-driver-webdriver@1.0.55...js/spec-driver-webdriver@1.0.56) (2024-02-06)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * avoid error when extracting driver capabilities ([#2176](https://github.com/applitools/eyes.sdk.javascript1/issues/2176)) ([8971f1c](https://github.com/applitools/eyes.sdk.javascript1/commit/8971f1c07a73c1259e117c5c3c8d43d1d324c584))
9
+
3
10
  ## [1.0.55](https://github.com/applitools/eyes.sdk.javascript1/compare/js/spec-driver-webdriver@1.0.54...js/spec-driver-webdriver@1.0.55) (2024-01-30)
4
11
 
5
12
 
@@ -346,15 +346,8 @@ async function getDriverInfo(driver) {
346
346
  exports.getDriverInfo = getDriverInfo;
347
347
  async function getCapabilities(driver) {
348
348
  var _a;
349
- try {
350
- const capabilities = await ((_a = driver.getSession) === null || _a === void 0 ? void 0 : _a.call(driver));
351
- return utils.types.isObject(capabilities) ? capabilities : driver.capabilities;
352
- }
353
- catch (error) {
354
- if (/Cannot call non W3C standard command while in W3C mode/i.test(error.message))
355
- return driver.capabilities;
356
- throw new Error(`Unable to retrieve capabilities due to an error. The original error is ${error.message}`);
357
- }
349
+ const capabilities = await ((_a = driver.getSession) === null || _a === void 0 ? void 0 : _a.call(driver).catch(() => null));
350
+ return utils.types.isObject(capabilities) ? capabilities : driver.capabilities;
358
351
  }
359
352
  exports.getCapabilities = getCapabilities;
360
353
  async function getWindowSize(driver) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@applitools/spec-driver-webdriver",
3
- "version": "1.0.55",
3
+ "version": "1.0.56",
4
4
  "keywords": [
5
5
  "webdriver",
6
6
  "chrome devtools protocol",