webdriverio 8.0.0-alpha.512 → 8.0.0-alpha.516

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.
@@ -194,7 +194,7 @@ export async function findElement(selector) {
194
194
  /**
195
195
  * fetch element using custom strategy function
196
196
  */
197
- if (typeof selector === 'object' && typeof selector.strategy === 'function') {
197
+ if (selector && typeof selector === 'object' && typeof selector.strategy === 'function') {
198
198
  const { strategy, strategyName, strategyArguments } = selector;
199
199
  const notFoundError = new Error(`Custom Strategy "${strategyName}" did not return an HTMLElement`);
200
200
  let elem = await browserObject.execute(strategy, ...strategyArguments);
@@ -288,7 +288,7 @@ export async function findElements(selector) {
288
288
  */
289
289
  export function verifyArgsAndStripIfElement(args) {
290
290
  function verify(arg) {
291
- if (typeof arg === 'object' && arg.constructor.name === 'Element') {
291
+ if (arg && typeof arg === 'object' && arg.constructor.name === 'Element') {
292
292
  const elem = arg;
293
293
  if (!elem.elementId) {
294
294
  throw new Error(`The element with selector "${elem.selector}" you are trying to pass into the execute method wasn't found`);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "webdriverio",
3
3
  "description": "Next-gen browser and mobile automation test framework for Node.js",
4
- "version": "8.0.0-alpha.512+fca9082b6",
4
+ "version": "8.0.0-alpha.516+ef18eb180",
5
5
  "homepage": "https://webdriver.io",
6
6
  "author": "Christian Bromann <mail@bromann.dev>",
7
7
  "license": "MIT",
@@ -66,17 +66,17 @@
66
66
  "dependencies": {
67
67
  "@types/aria-query": "^5.0.0",
68
68
  "@types/node": "^18.0.0",
69
- "@wdio/config": "8.0.0-alpha.512+fca9082b6",
70
- "@wdio/logger": "8.0.0-alpha.512+fca9082b6",
71
- "@wdio/protocols": "8.0.0-alpha.512+fca9082b6",
72
- "@wdio/repl": "8.0.0-alpha.512+fca9082b6",
73
- "@wdio/types": "8.0.0-alpha.512+fca9082b6",
74
- "@wdio/utils": "8.0.0-alpha.512+fca9082b6",
69
+ "@wdio/config": "8.0.0-alpha.516+ef18eb180",
70
+ "@wdio/logger": "8.0.0-alpha.516+ef18eb180",
71
+ "@wdio/protocols": "8.0.0-alpha.516+ef18eb180",
72
+ "@wdio/repl": "8.0.0-alpha.516+ef18eb180",
73
+ "@wdio/types": "8.0.0-alpha.516+ef18eb180",
74
+ "@wdio/utils": "8.0.0-alpha.516+ef18eb180",
75
75
  "archiver": "^5.0.0",
76
76
  "aria-query": "^5.0.0",
77
77
  "css-shorthand-properties": "^1.1.1",
78
78
  "css-value": "^0.0.1",
79
- "devtools": "8.0.0-alpha.512+fca9082b6",
79
+ "devtools": "8.0.0-alpha.516+ef18eb180",
80
80
  "devtools-protocol": "^0.0.1065144",
81
81
  "grapheme-splitter": "^1.0.2",
82
82
  "is-plain-obj": "^4.1.0",
@@ -88,7 +88,7 @@
88
88
  "resq": "^1.9.1",
89
89
  "rgb2hex": "0.2.5",
90
90
  "serialize-error": "^8.0.0",
91
- "webdriver": "8.0.0-alpha.512+fca9082b6"
91
+ "webdriver": "8.0.0-alpha.516+ef18eb180"
92
92
  },
93
- "gitHead": "fca9082b61da2bbceedf7c68897d07f59f715f0a"
93
+ "gitHead": "ef18eb180b61077d44a307c0410593930101e842"
94
94
  }