@wdio/runner 9.0.0-alpha.0 → 9.0.0-alpha.64

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.
Files changed (2) hide show
  1. package/build/browser.js +6 -6
  2. package/package.json +13 -13
package/build/browser.js CHANGED
@@ -236,12 +236,6 @@ export default class BrowserFramework {
236
236
  return this.#sendWorkerResponse(id, this.#commandResponse({ id: payload.id, error }));
237
237
  }
238
238
  try {
239
- /**
240
- * double check if function is registered
241
- */
242
- if (typeof browser[payload.commandName] !== 'function') {
243
- throw new Error(`browser.${payload.commandName} is not a function`);
244
- }
245
239
  /**
246
240
  * user either the browser instance or an element based on whether or not
247
241
  * a scope property was passed in
@@ -249,6 +243,12 @@ export default class BrowserFramework {
249
243
  const scope = payload.scope
250
244
  ? await browser.$({ [ELEMENT_KEY]: payload.scope })
251
245
  : browser;
246
+ /**
247
+ * double check if function is registered
248
+ */
249
+ if (typeof scope[payload.commandName] !== 'function') {
250
+ throw new Error(`${payload.scope ? 'element' : 'browser'}.${payload.commandName} is not a function`);
251
+ }
252
252
  let result = await scope[payload.commandName](...payload.args);
253
253
  /**
254
254
  * if result is an element, transform it into an element reference
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wdio/runner",
3
- "version": "9.0.0-alpha.0",
3
+ "version": "9.0.0-alpha.64+3cfecb6e4",
4
4
  "description": "A WebdriverIO service that runs tests in arbitrary environments",
5
5
  "author": "Christian Bromann <mail@bromann.dev>",
6
6
  "homepage": "https://github.com/webdriverio/webdriverio/tree/main/packages/wdio-runner",
@@ -29,20 +29,20 @@
29
29
  },
30
30
  "typeScriptVersion": "3.8.3",
31
31
  "dependencies": {
32
- "@types/node": "^20.1.0",
33
- "@wdio/config": "9.0.0-alpha.0",
34
- "@wdio/globals": "9.0.0-alpha.0",
35
- "@wdio/logger": "9.0.0-alpha.0",
36
- "@wdio/types": "9.0.0-alpha.0",
37
- "@wdio/utils": "9.0.0-alpha.0",
38
- "deepmerge-ts": "^5.0.0",
39
- "expect-webdriverio": "^4.11.2",
40
- "gaze": "^1.1.2",
41
- "webdriver": "9.0.0-alpha.0",
42
- "webdriverio": "9.0.0-alpha.0"
32
+ "@types/node": "^20.11.28",
33
+ "@wdio/config": "9.0.0-alpha.64+3cfecb6e4",
34
+ "@wdio/globals": "9.0.0-alpha.64+3cfecb6e4",
35
+ "@wdio/logger": "9.0.0-alpha.64+3cfecb6e4",
36
+ "@wdio/types": "9.0.0-alpha.64+3cfecb6e4",
37
+ "@wdio/utils": "9.0.0-alpha.64+3cfecb6e4",
38
+ "deepmerge-ts": "^5.1.0",
39
+ "expect-webdriverio": "^4.12.0",
40
+ "gaze": "^1.1.3",
41
+ "webdriver": "9.0.0-alpha.64+3cfecb6e4",
42
+ "webdriverio": "9.0.0-alpha.64+3cfecb6e4"
43
43
  },
44
44
  "publishConfig": {
45
45
  "access": "public"
46
46
  },
47
- "gitHead": "75d45a1efff8705785f0fbcd2379ac624d16e007"
47
+ "gitHead": "3cfecb6e45e7d38a1e86766d79d83822160c8e45"
48
48
  }