@wdio/globals 8.35.1 → 9.0.0-alpha.59

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/cjs/package.json CHANGED
@@ -1,3 +1,5 @@
1
1
  {
2
- "type": "commonjs"
2
+ "name": "@wdio/globals-cjs",
3
+ "type": "commonjs",
4
+ "private": true
3
5
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wdio/globals",
3
- "version": "8.35.1",
3
+ "version": "9.0.0-alpha.59+259e4a29f",
4
4
  "description": "A helper utility for importing global variables directly",
5
5
  "author": "Christian Bromann <mail@bromann.dev>",
6
6
  "homepage": "https://github.com/webdriverio/webdriverio/tree/main/packages/wdio-globals",
@@ -23,7 +23,7 @@
23
23
  "types": "./build/index.d.ts",
24
24
  "typeScriptVersion": "3.8.3",
25
25
  "engines": {
26
- "node": "^16.13 || >=18"
26
+ "node": ">=18"
27
27
  },
28
28
  "repository": {
29
29
  "type": "git",
@@ -43,7 +43,7 @@
43
43
  },
44
44
  "optionalDependencies": {
45
45
  "expect-webdriverio": "^4.11.2",
46
- "webdriverio": "8.35.1"
46
+ "webdriverio": "9.0.0-alpha.59+259e4a29f"
47
47
  },
48
- "gitHead": "7ac0ca2f7ac53ecc45e0a7c77ddc117a40fdda3d"
48
+ "gitHead": "259e4a29f28745e0af3ca6ca3140c8cf491e3771"
49
49
  }
package/types.d.ts CHANGED
@@ -11,6 +11,30 @@ declare module NodeJS {
11
11
 
12
12
  declare function $(...args: Parameters<WebdriverIO.Browser['$']>): ReturnType<WebdriverIO.Browser['$']>
13
13
  declare function $$(...args: Parameters<WebdriverIO.Browser['$$']>): ReturnType<WebdriverIO.Browser['$$']>
14
+ declare var multiremotebrowser: WebdriverIO.MultiRemoteBrowser
14
15
  declare var browser: WebdriverIO.Browser
15
16
  declare var driver: WebdriverIO.Browser
16
- declare var multiremotebrowser: WebdriverIO.MultiRemoteBrowser
17
+ declare var expect: ExpectType
18
+
19
+ /**
20
+ * custom environment primitives for WebdriverIO when running in a browser
21
+ */
22
+ declare var wdio: {
23
+ /**
24
+ * This command is available when running WebdriverIO tests using `@wdio/browser-runner`.
25
+ * It allows you to execute a command in Node.js land if desired.
26
+ * @param command The command to execute
27
+ * @param args The arguments to pass to the command
28
+ * @returns The result of the command
29
+ */
30
+ execute: <CommandName>(command: CommandName, ...args: any[]) => ReturnType<WebdriverIO.Browser[CommandName]>
31
+ /**
32
+ * This command is available when running WebdriverIO tests using `@wdio/browser-runner`.
33
+ * It allows you to execute a command in Node.js land if desired.
34
+ * @param command The command to execute
35
+ * @param scope The element id when the command needs to be executed from an element scope
36
+ * @param args The arguments to pass to the command
37
+ * @returns The result of the command
38
+ */
39
+ executeWithScope: <CommandName>(commandName: CommandName, scope: string, ...args: any[]) => ReturnType<WebdriverIO.Browser[CommandName]>
40
+ }