@wdio/utils 8.24.2 → 8.24.4

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.
@@ -1 +1 @@
1
- {"version":3,"file":"monad.d.ts","sourceRoot":"","sources":["../src/monad.ts"],"names":[],"mappings":"AAYA,UAAU,gBAAgB;IACtB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,kBAAkB,CAAA;CAC7C;AAED,MAAM,CAAC,OAAO,UAAU,SAAS,CAAE,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,QAAQ,CAAC,EAAE,QAAQ,EAAE,gBAAgB,GAAE,gBAAqB;WAkBpG,IAAI,aAAa,MAAM,mBAAmB,QAAQ;IA+GvE;;;;;;OAMG;eACyB,MAAM,QAAQ,QAAQ,SAAS,OAAO,MAAM,EAAE,GAAG,CAAC,gBAAgB,QAAQ;EA6CzG"}
1
+ {"version":3,"file":"monad.d.ts","sourceRoot":"","sources":["../src/monad.ts"],"names":[],"mappings":"AAYA,UAAU,gBAAgB;IACtB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,kBAAkB,CAAA;CAC7C;AAED,MAAM,CAAC,OAAO,UAAU,SAAS,CAAE,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,QAAQ,CAAC,EAAE,QAAQ,EAAE,gBAAgB,GAAE,gBAAqB;WAkBpG,IAAI,aAAa,MAAM,mBAAmB,QAAQ;IA+GvE;;;;;;OAMG;eACyB,MAAM,QAAQ,QAAQ,SAAS,OAAO,MAAM,EAAE,GAAG,CAAC,gBAAgB,QAAQ;EA8CzG"}
package/build/monad.js CHANGED
@@ -145,9 +145,10 @@ export default function WebDriver(options, modifier, propertiesObject = {}) {
145
145
  * always transform result into promise
146
146
  */
147
147
  Promise.resolve(result).then((res) => {
148
+ const elem = res;
148
149
  let resultLog = res;
149
- if (res instanceof SCOPE_TYPES.element) {
150
- resultLog = `WebdriverIO.Element<${res.elementId}>`;
150
+ if (elem instanceof SCOPE_TYPES.element) {
151
+ resultLog = `WebdriverIO.Element<${elem.elementId || elem.selector}>`;
151
152
  }
152
153
  else if (res instanceof SCOPE_TYPES.browser) {
153
154
  resultLog = 'WebdriverIO.Browser';
package/build/shim.js CHANGED
@@ -272,7 +272,7 @@ export async function executeAsync(fn, retries, args = [], timeout = 20000) {
272
272
  })
273
273
  ]);
274
274
  done = true;
275
- if (typeof result === 'object' && 'finally' in result && typeof result.finally === 'function') {
275
+ if (result !== null && typeof result === 'object' && 'finally' in result && typeof result.finally === 'function') {
276
276
  result.catch((err) => err);
277
277
  }
278
278
  return await result;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wdio/utils",
3
- "version": "8.24.2",
3
+ "version": "8.24.4",
4
4
  "description": "A WDIO helper utility to provide several utility functions used across the project.",
5
5
  "author": "Christian Bromann <mail@bromann.dev>",
6
6
  "homepage": "https://github.com/webdriverio/webdriverio/tree/main/packages/wdio-utils",
@@ -55,5 +55,5 @@
55
55
  "publishConfig": {
56
56
  "access": "public"
57
57
  },
58
- "gitHead": "6c01d2d2c47c32988e8b01ee9c43279f813b2e41"
58
+ "gitHead": "08859dd23faf79e17469cdd2ec9a092a888f3677"
59
59
  }