create-wdio 9.32.0 → 10.0.0-alpha.149
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/AGENTS.md +40 -0
- package/README.md +8 -0
- package/build/answerFlags.d.ts +68 -0
- package/build/answerFlags.d.ts.map +1 -0
- package/build/cli/agent.d.ts +17 -0
- package/build/cli/agent.d.ts.map +1 -0
- package/build/cli/config.d.ts +4 -4
- package/build/cli/config.d.ts.map +1 -1
- package/build/cli/utils.d.ts +3 -3
- package/build/cli/utils.d.ts.map +1 -1
- package/build/config/cli.js +534 -67
- package/build/constants.d.ts +7 -0
- package/build/constants.d.ts.map +1 -1
- package/build/index.d.ts.map +1 -1
- package/build/index.js +380 -13
- package/build/install/cli.js +471 -70
- package/build/templates/snippets/cucumber.ejs +1 -1
- package/build/templates/snippets/services.ejs +9 -0
- package/build/types.d.ts +10 -2
- package/build/types.d.ts.map +1 -1
- package/build/utils/index.js +269 -7
- package/build/utils.d.ts +16 -4
- package/build/utils.d.ts.map +1 -1
- package/package.json +5 -6
- package/templates/wdio-session/SKILL.md +96 -0
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
// <boolean> fail if there are any undefined or pending steps
|
|
21
21
|
strict: false,
|
|
22
22
|
// <string> (expression) only execute the features or scenarios with tags matching the expression
|
|
23
|
-
|
|
23
|
+
tags: '',
|
|
24
24
|
// <number> timeout for step definitions
|
|
25
25
|
timeout: 60000,
|
|
26
26
|
// <boolean> Enable this config to treat undefined definitions as warnings.
|
|
@@ -33,6 +33,15 @@ services: [<%- answers.services.map((service) => {
|
|
|
33
33
|
// see https://webdriver.io/docs/desktop-testing/dioxus/configuration for all options
|
|
34
34
|
}
|
|
35
35
|
]`
|
|
36
|
+
} else if (service === 'ai') {
|
|
37
|
+
return /*js*/`[
|
|
38
|
+
'ai',
|
|
39
|
+
{
|
|
40
|
+
// "provider:model", e.g. 'anthropic:claude-sonnet-5-5' with @langchain/anthropic installed,
|
|
41
|
+
// or set WDIO_AI_MODEL. See https://webdriver.io/docs/ai-steps
|
|
42
|
+
model: process.env.WDIO_AI_MODEL
|
|
43
|
+
}
|
|
44
|
+
]`
|
|
36
45
|
} else if (service === 'sauce' && answers.useSauceConnect) {
|
|
37
46
|
return /*js*/`[
|
|
38
47
|
'sauce',
|
package/build/types.d.ts
CHANGED
|
@@ -3,7 +3,11 @@ import type { PackageJson as typeFestPackageJson } from 'type-fest';
|
|
|
3
3
|
import type { Package as normalizePackage } from 'normalize-package-data';
|
|
4
4
|
export type NormalizedPackageJson = PackageJson & normalizePackage;
|
|
5
5
|
export type PackageJson = typeFestPackageJson;
|
|
6
|
-
|
|
6
|
+
/**
|
|
7
|
+
* Wizard answers passed as flags, see `ANSWER_FLAGS`
|
|
8
|
+
*/
|
|
9
|
+
export type AnswerFlagArguments = Record<string, string | string[] | boolean | number | undefined>;
|
|
10
|
+
export interface ProgramOpts extends AnswerFlagArguments {
|
|
7
11
|
info: boolean;
|
|
8
12
|
dev: boolean;
|
|
9
13
|
yes: boolean;
|
|
@@ -44,6 +48,10 @@ export interface Questionnair {
|
|
|
44
48
|
reporters: string[];
|
|
45
49
|
services: string[];
|
|
46
50
|
serenityLibPath?: string;
|
|
51
|
+
/**
|
|
52
|
+
* Write AGENTS.md rules, the wdio-session skill and a gitignore entry.
|
|
53
|
+
*/
|
|
54
|
+
agentSupport?: boolean;
|
|
47
55
|
plugins: string[];
|
|
48
56
|
outputDir?: string;
|
|
49
57
|
includeVisualTesting: boolean;
|
|
@@ -82,7 +90,7 @@ export interface ParsedAnswers extends Omit<Questionnair, 'runner' | 'framework'
|
|
|
82
90
|
tsProject: string;
|
|
83
91
|
wdioConfigPath: string;
|
|
84
92
|
}
|
|
85
|
-
export interface ConfigCommandArguments {
|
|
93
|
+
export interface ConfigCommandArguments extends AnswerFlagArguments {
|
|
86
94
|
yarn: boolean;
|
|
87
95
|
yes: boolean;
|
|
88
96
|
npmTag: string;
|
package/build/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,aAAa,EAAE,uBAAuB,EAAE,sBAAsB,EAAE,yBAAyB,EAAE,0BAA0B,EAAE,MAAM,gBAAgB,CAAA;AAC1K,OAAO,KAAK,EAAE,WAAW,IAAI,mBAAmB,EAAE,MAAM,WAAW,CAAA;AACnE,OAAO,KAAK,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,wBAAwB,CAAA;AACzE,MAAM,MAAM,qBAAqB,GAAG,WAAW,GAAG,gBAAgB,CAAA;AAClE,MAAM,MAAM,WAAW,GAAG,mBAAmB,CAAA;AAE7C,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,aAAa,EAAE,uBAAuB,EAAE,sBAAsB,EAAE,yBAAyB,EAAE,0BAA0B,EAAE,MAAM,gBAAgB,CAAA;AAC1K,OAAO,KAAK,EAAE,WAAW,IAAI,mBAAmB,EAAE,MAAM,WAAW,CAAA;AACnE,OAAO,KAAK,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,wBAAwB,CAAA;AACzE,MAAM,MAAM,qBAAqB,GAAG,WAAW,GAAG,gBAAgB,CAAA;AAClE,MAAM,MAAM,WAAW,GAAG,mBAAmB,CAAA;AAE7C;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,OAAO,GAAG,MAAM,GAAG,SAAS,CAAC,CAAA;AAElG,MAAM,WAAW,WAAY,SAAQ,mBAAmB;IACpD,IAAI,EAAE,OAAO,CAAA;IACb,GAAG,EAAE,OAAO,CAAA;IACZ,GAAG,EAAE,OAAO,CAAA;IACZ,MAAM,EAAE,MAAM,CAAA;CACjB;A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AAA;IACxB,sBAAsB,EAAE,MAAM,CAAA;IAC9B,gBAAgB,EAAE,MAAM,CAAC;IACzB,uBAAuB,EAAE,MAAM,CAAA;IAC/B,YAAY,EAAE,MAAM,CAAA;IACpB,eAAe,EAAE,OAAO,CAAA;IACxB,gBAAgB,EAAE,MAAM,CAAA;IACxB,SAAS,EAAE,MAAM,CAAA;IACjB,cAAc,EAAE,MAAM,CAAA;CACzB;AAED,MAAM,WAAW,sBAAuB,SAAQ,mBAAmB;IAC/D,IAAI,EAAE,OAAO,CAAA;IACb,GAAG,EAAE,OAAO,CAAA;IACZ,MAAM,EAAE,MAAM,CAAA;CACjB;AAED,MAAM,WAAW,gBAAgB;IAC7B,OAAO,EAAE,MAAM,CAAA;IACf,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,EAAE,MAAM,CAAA;CAClB;AAED,MAAM,WAAW,YAAY;IACzB,YAAY,EAAE,OAAO,CAAA;IACrB,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,EAAE,qBAAqB,CAAA;CACrC;AAED,MAAM,WAAW,uBAAuB;IACpC,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,IAAI,EAAE,SAAS,GAAG,UAAU,GAAG,WAAW,GAAG,QAAQ,CAAA;IACrD,IAAI,EAAE,MAAM,CAAA;CACf"}
|
package/build/utils/index.js
CHANGED
|
@@ -4,7 +4,6 @@ import path from "node:path";
|
|
|
4
4
|
import util, { promisify } from "node:util";
|
|
5
5
|
import fs from "node:fs/promises";
|
|
6
6
|
import { execSync } from "node:child_process";
|
|
7
|
-
import readDir from "recursive-readdir";
|
|
8
7
|
import { $ } from "execa";
|
|
9
8
|
import { readPackageUp } from "read-pkg-up";
|
|
10
9
|
import inquirer from "inquirer";
|
|
@@ -15,6 +14,264 @@ import chalk from "chalk";
|
|
|
15
14
|
// src/install.ts
|
|
16
15
|
import { execa } from "execa";
|
|
17
16
|
|
|
17
|
+
// src/answerFlags.ts
|
|
18
|
+
var HASH = "$--$";
|
|
19
|
+
function packageChoices(packages, key = (short) => short) {
|
|
20
|
+
return () => Object.fromEntries(packages().map(({ value }) => {
|
|
21
|
+
const [pkg, short, purpose] = value.split(HASH);
|
|
22
|
+
return [key(short, purpose, pkg), value];
|
|
23
|
+
}));
|
|
24
|
+
}
|
|
25
|
+
var ANSWER_FLAGS = [{
|
|
26
|
+
name: "runner",
|
|
27
|
+
answer: "runner",
|
|
28
|
+
type: "string",
|
|
29
|
+
desc: "Type of testing",
|
|
30
|
+
choices: packageChoices(() => SUPPORTED_PACKAGES.runner, (_, purpose) => purpose)
|
|
31
|
+
}, {
|
|
32
|
+
name: "preset",
|
|
33
|
+
answer: "preset",
|
|
34
|
+
type: "string",
|
|
35
|
+
desc: "UI framework of your components (with --runner component)",
|
|
36
|
+
choices: () => Object.fromEntries(SUPPORTED_BROWSER_RUNNER_PRESETS.map(({ name, value }) => [
|
|
37
|
+
value === null ? "other" : value.split(HASH)[1] || name.split(" ")[0].toLowerCase(),
|
|
38
|
+
value
|
|
39
|
+
]))
|
|
40
|
+
}, {
|
|
41
|
+
name: "testingLibrary",
|
|
42
|
+
answer: "installTestingLibrary",
|
|
43
|
+
type: "boolean",
|
|
44
|
+
desc: "Install Testing Library (with --preset vue, svelte, solid, react or preact)"
|
|
45
|
+
}, {
|
|
46
|
+
name: "desktopFramework",
|
|
47
|
+
answer: "desktopFramework",
|
|
48
|
+
type: "string",
|
|
49
|
+
desc: "Desktop app framework (with --runner desktop)",
|
|
50
|
+
choices: () => ({
|
|
51
|
+
electron: "Electron (https://www.electronjs.org/)" /* Electron */,
|
|
52
|
+
tauri: "Tauri (https://tauri.app/)" /* Tauri */,
|
|
53
|
+
dioxus: "Dioxus (https://dioxuslabs.com/)" /* Dioxus */,
|
|
54
|
+
macos: "Native macOS app" /* MacOS */
|
|
55
|
+
})
|
|
56
|
+
}, {
|
|
57
|
+
name: "electronBuildTool",
|
|
58
|
+
answer: "electronBuildTool",
|
|
59
|
+
type: "string",
|
|
60
|
+
desc: "Tool that builds your Electron app (with --desktop-framework electron)",
|
|
61
|
+
choices: () => ({
|
|
62
|
+
forge: "Electron Forge (https://www.electronforge.io/)" /* ElectronForge */,
|
|
63
|
+
builder: "electron-builder (https://www.electron.build/)" /* ElectronBuilder */,
|
|
64
|
+
other: "Something else" /* SomethingElse */
|
|
65
|
+
})
|
|
66
|
+
}, {
|
|
67
|
+
name: "electronAppBinaryPath",
|
|
68
|
+
answer: "electronAppBinaryPath",
|
|
69
|
+
type: "string",
|
|
70
|
+
desc: "Path to the built Electron app (with --electron-build-tool other)"
|
|
71
|
+
}, {
|
|
72
|
+
name: "tauriDriverProvider",
|
|
73
|
+
answer: "tauriDriverProvider",
|
|
74
|
+
type: "string",
|
|
75
|
+
desc: "WebDriver provider for Tauri (with --desktop-framework tauri)",
|
|
76
|
+
choices: () => ({
|
|
77
|
+
official: "Official tauri-driver (cross-platform, Cargo-installed)" /* Official */,
|
|
78
|
+
crabnebula: "CrabNebula tauri-driver (managed cloud / drop-in)" /* CrabNebula */,
|
|
79
|
+
embedded: "Embedded driver via tauri-plugin-wdio-webdriver crate" /* Embedded */
|
|
80
|
+
})
|
|
81
|
+
}, {
|
|
82
|
+
name: "tauriFrontendPlugin",
|
|
83
|
+
answer: "tauriUseFrontendPlugin",
|
|
84
|
+
type: "boolean",
|
|
85
|
+
desc: "Install @wdio/tauri-plugin (with --desktop-framework tauri)"
|
|
86
|
+
}, {
|
|
87
|
+
name: "tauriAppBinaryPath",
|
|
88
|
+
answer: "tauriAppBinaryPath",
|
|
89
|
+
type: "string",
|
|
90
|
+
desc: "Path to the built Tauri binary (with --desktop-framework tauri)"
|
|
91
|
+
}, {
|
|
92
|
+
name: "dioxusDriverProvider",
|
|
93
|
+
answer: "dioxusDriverProvider",
|
|
94
|
+
type: "string",
|
|
95
|
+
desc: "WebDriver provider for Dioxus (with --desktop-framework dioxus)",
|
|
96
|
+
choices: () => ({
|
|
97
|
+
embedded: "Embedded in-process driver (recommended \u2014 no external driver, all platforms)" /* Embedded */,
|
|
98
|
+
external: "External driver via wdio-dioxus-driver (Windows only)" /* External */
|
|
99
|
+
})
|
|
100
|
+
}, {
|
|
101
|
+
name: "dioxusAppBinaryPath",
|
|
102
|
+
answer: "dioxusAppBinaryPath",
|
|
103
|
+
type: "string",
|
|
104
|
+
desc: "Path to the Dioxus debug binary (with --desktop-framework dioxus)"
|
|
105
|
+
}, {
|
|
106
|
+
name: "backend",
|
|
107
|
+
answer: "backend",
|
|
108
|
+
type: "string",
|
|
109
|
+
desc: "Where the automation backend runs (with --runner e2e)",
|
|
110
|
+
choices: () => ({
|
|
111
|
+
local: "On my local machine" /* Local */,
|
|
112
|
+
experitest: "In the cloud using Experitest" /* Experitest */,
|
|
113
|
+
saucelabs: "In the cloud using Sauce Labs" /* Saucelabs */,
|
|
114
|
+
browserstack: "In the cloud using BrowserStack" /* Browserstack */,
|
|
115
|
+
other: "In the cloud using Testingbot or LambdaTest or a different service" /* OtherVendors */,
|
|
116
|
+
grid: "I have my own Selenium cloud" /* Grid */
|
|
117
|
+
})
|
|
118
|
+
}, {
|
|
119
|
+
name: "environment",
|
|
120
|
+
answer: "e2eEnvironment",
|
|
121
|
+
type: "string",
|
|
122
|
+
desc: "What to automate (with --runner e2e). Implied by --browsers or --mobile-environment",
|
|
123
|
+
choices: () => ({ web: "web", mobile: "mobile" })
|
|
124
|
+
}, {
|
|
125
|
+
name: "mobileEnvironment",
|
|
126
|
+
answer: "mobileEnvironment",
|
|
127
|
+
type: "string",
|
|
128
|
+
desc: "Mobile platform (with --environment mobile)",
|
|
129
|
+
choices: () => ({ android: "android", ios: "ios" })
|
|
130
|
+
}, {
|
|
131
|
+
name: "browsers",
|
|
132
|
+
answer: "browserEnvironment",
|
|
133
|
+
type: "array",
|
|
134
|
+
desc: "Comma-separated browsers to start with (with --environment web)",
|
|
135
|
+
choices: () => ({ chrome: "chrome", firefox: "firefox", safari: "safari", edge: "MicrosoftEdge" })
|
|
136
|
+
}, {
|
|
137
|
+
name: "hostname",
|
|
138
|
+
answer: "hostname",
|
|
139
|
+
type: "string",
|
|
140
|
+
desc: "Host of the cloud service or Selenium server (with --backend other or grid)"
|
|
141
|
+
}, {
|
|
142
|
+
name: "port",
|
|
143
|
+
answer: "port",
|
|
144
|
+
type: "string",
|
|
145
|
+
desc: "Port of the cloud service or Selenium server (with --backend other or grid)"
|
|
146
|
+
}, {
|
|
147
|
+
name: "path",
|
|
148
|
+
answer: "path",
|
|
149
|
+
type: "string",
|
|
150
|
+
desc: "Path of the Selenium server (with --backend grid)"
|
|
151
|
+
}, {
|
|
152
|
+
name: "envUser",
|
|
153
|
+
answer: "env_user",
|
|
154
|
+
type: "string",
|
|
155
|
+
desc: "Environment variable for the cloud username (with --backend saucelabs or browserstack, or other with a lambdatest.com --hostname)"
|
|
156
|
+
}, {
|
|
157
|
+
name: "envKey",
|
|
158
|
+
answer: "env_key",
|
|
159
|
+
type: "string",
|
|
160
|
+
desc: "Environment variable for the cloud access key (with --backend saucelabs or browserstack, or other with a lambdatest.com --hostname)"
|
|
161
|
+
}, {
|
|
162
|
+
name: "region",
|
|
163
|
+
answer: "region",
|
|
164
|
+
type: "string",
|
|
165
|
+
desc: "Sauce Labs region (with --backend saucelabs)",
|
|
166
|
+
choices: () => Object.fromEntries(Object.values(RegionOptions).map((region) => [region, region]))
|
|
167
|
+
}, {
|
|
168
|
+
name: "sauceConnect",
|
|
169
|
+
answer: "useSauceConnect",
|
|
170
|
+
type: "boolean",
|
|
171
|
+
desc: "Set up Sauce Connect for a local app (with --backend saucelabs)"
|
|
172
|
+
}, {
|
|
173
|
+
name: "expAccessKey",
|
|
174
|
+
answer: "expEnvAccessKey",
|
|
175
|
+
type: "string",
|
|
176
|
+
desc: "Experitest access key (with --backend experitest)"
|
|
177
|
+
}, {
|
|
178
|
+
name: "expHostname",
|
|
179
|
+
answer: "expEnvHostname",
|
|
180
|
+
type: "string",
|
|
181
|
+
desc: "Experitest cloud host (with --backend experitest)"
|
|
182
|
+
}, {
|
|
183
|
+
name: "expPort",
|
|
184
|
+
answer: "expEnvPort",
|
|
185
|
+
type: "string",
|
|
186
|
+
desc: "Experitest cloud port (with --backend experitest)"
|
|
187
|
+
}, {
|
|
188
|
+
name: "expProtocol",
|
|
189
|
+
answer: "expEnvProtocol",
|
|
190
|
+
type: "string",
|
|
191
|
+
desc: "Experitest protocol (with --backend experitest and a port other than 80 or 443)",
|
|
192
|
+
choices: () => ({ http: "http", https: "https" })
|
|
193
|
+
}, {
|
|
194
|
+
name: "framework",
|
|
195
|
+
answer: "framework",
|
|
196
|
+
type: "string",
|
|
197
|
+
desc: "Test framework",
|
|
198
|
+
choices: packageChoices(() => SUPPORTED_PACKAGES.framework, (short, purpose, pkg) => pkg.startsWith("@serenity-js") ? `serenity-${purpose}` : short)
|
|
199
|
+
}, {
|
|
200
|
+
name: "typescript",
|
|
201
|
+
answer: "isUsingTypeScript",
|
|
202
|
+
type: "boolean",
|
|
203
|
+
desc: "Write tests in TypeScript"
|
|
204
|
+
}, {
|
|
205
|
+
name: "generateTestFiles",
|
|
206
|
+
answer: "generateTestFiles",
|
|
207
|
+
type: "boolean",
|
|
208
|
+
desc: "Generate example test files"
|
|
209
|
+
}, {
|
|
210
|
+
name: "specs",
|
|
211
|
+
answer: "specs",
|
|
212
|
+
type: "string",
|
|
213
|
+
desc: "Location of spec or feature files (with --generate-test-files)"
|
|
214
|
+
}, {
|
|
215
|
+
name: "stepDefinitions",
|
|
216
|
+
answer: "stepDefinitions",
|
|
217
|
+
type: "string",
|
|
218
|
+
desc: "Location of step definitions (with --framework cucumber)"
|
|
219
|
+
}, {
|
|
220
|
+
name: "pageObjects",
|
|
221
|
+
answer: "usePageObjects",
|
|
222
|
+
type: "boolean",
|
|
223
|
+
desc: "Generate page objects (with --runner e2e and --generate-test-files)"
|
|
224
|
+
}, {
|
|
225
|
+
name: "pages",
|
|
226
|
+
answer: "pages",
|
|
227
|
+
type: "string",
|
|
228
|
+
desc: "Location of page objects (with --page-objects)"
|
|
229
|
+
}, {
|
|
230
|
+
name: "serenityLibPath",
|
|
231
|
+
answer: "serenityLibPath",
|
|
232
|
+
type: "string",
|
|
233
|
+
desc: "Location of the Serenity/JS Screenplay library (with --framework serenity-*)"
|
|
234
|
+
}, {
|
|
235
|
+
name: "agentSupport",
|
|
236
|
+
answer: "agentSupport",
|
|
237
|
+
type: "boolean",
|
|
238
|
+
desc: "Write the AGENTS.md section and the wdio-session skill"
|
|
239
|
+
}, {
|
|
240
|
+
name: "reporters",
|
|
241
|
+
answer: "reporters",
|
|
242
|
+
type: "array",
|
|
243
|
+
desc: "Comma-separated reporters",
|
|
244
|
+
choices: packageChoices(() => SUPPORTED_PACKAGES.reporter)
|
|
245
|
+
}, {
|
|
246
|
+
name: "plugins",
|
|
247
|
+
answer: "plugins",
|
|
248
|
+
type: "array",
|
|
249
|
+
desc: "Comma-separated plugins",
|
|
250
|
+
choices: packageChoices(() => SUPPORTED_PACKAGES.plugin)
|
|
251
|
+
}, {
|
|
252
|
+
name: "visualTesting",
|
|
253
|
+
answer: "includeVisualTesting",
|
|
254
|
+
type: "boolean",
|
|
255
|
+
desc: "Add visual testing (with --runner e2e or component)"
|
|
256
|
+
}, {
|
|
257
|
+
name: "services",
|
|
258
|
+
answer: "services",
|
|
259
|
+
type: "array",
|
|
260
|
+
desc: "Comma-separated services, replaces the ones the wizard picks for your setup",
|
|
261
|
+
choices: packageChoices(() => SUPPORTED_PACKAGES.service)
|
|
262
|
+
}, {
|
|
263
|
+
name: "npmInstall",
|
|
264
|
+
answer: "npmInstall",
|
|
265
|
+
type: "boolean",
|
|
266
|
+
desc: "Install the dependencies"
|
|
267
|
+
}];
|
|
268
|
+
var ANSWER_FLAGS_HELP = [
|
|
269
|
+
"Every wizard question has a flag. A flag answers its question and the wizard",
|
|
270
|
+
"asks the rest, or uses the defaults for the rest with --yes. Boolean flags",
|
|
271
|
+
"take a --no- prefix, e.g. --no-typescript. A flag for a question the wizard",
|
|
272
|
+
"does not ask for your setup is an error, and so is a value it does not offer."
|
|
273
|
+
].join("\n");
|
|
274
|
+
|
|
18
275
|
// src/utils.ts
|
|
19
276
|
var NPM_COMMAND = /^win/.test(process.platform) ? "npm.cmd" : "npm";
|
|
20
277
|
var __dirname = path.dirname(url.fileURLToPath(import.meta.url));
|
|
@@ -88,7 +345,7 @@ async function detectCompiler(answers) {
|
|
|
88
345
|
// package.json
|
|
89
346
|
var package_default = {
|
|
90
347
|
name: "create-wdio",
|
|
91
|
-
version: "9.
|
|
348
|
+
version: "9.32.0",
|
|
92
349
|
description: "Install and setup a WebdriverIO project with all its dependencies in a single run",
|
|
93
350
|
author: "WebdriverIO Team <mail@webdriver.io>",
|
|
94
351
|
homepage: "https://github.com/webdriverio/webdriverio/tree/main/packages/create-wdio",
|
|
@@ -117,9 +374,9 @@ var package_default = {
|
|
|
117
374
|
}
|
|
118
375
|
},
|
|
119
376
|
types: "./build/index.d.ts",
|
|
120
|
-
typeScriptVersion: "
|
|
377
|
+
typeScriptVersion: "6.0.3",
|
|
121
378
|
engines: {
|
|
122
|
-
node: ">=
|
|
379
|
+
node: ">=22.19.0"
|
|
123
380
|
},
|
|
124
381
|
repository: {
|
|
125
382
|
type: "git",
|
|
@@ -149,10 +406,9 @@ var package_default = {
|
|
|
149
406
|
inquirer: "^12.7.0",
|
|
150
407
|
"normalize-package-data": "^7.0.0",
|
|
151
408
|
"read-pkg-up": "^10.1.0",
|
|
152
|
-
"recursive-readdir": "^2.2.3",
|
|
153
409
|
semver: "^7.6.3",
|
|
154
410
|
"type-fest": "^4.41.0",
|
|
155
|
-
yargs: "^
|
|
411
|
+
yargs: "^18.2.0"
|
|
156
412
|
},
|
|
157
413
|
devDependencies: {
|
|
158
414
|
"@types/cross-spawn": "^6.0.6",
|
|
@@ -180,7 +436,7 @@ var PROGRAM_TITLE = `
|
|
|
180
436
|
`;
|
|
181
437
|
var UNSUPPORTED_NODE_VERSION = `\u26A0\uFE0F Unsupported Node.js Version Error \u26A0\uFE0F
|
|
182
438
|
You are using Node.js ${process.version} which is too old to be used with WebdriverIO.
|
|
183
|
-
Please update to Node.js
|
|
439
|
+
Please update to Node.js v22.19.0 to continue.
|
|
184
440
|
`;
|
|
185
441
|
var INSTALL_COMMAND = {
|
|
186
442
|
npm: "install",
|
|
@@ -237,6 +493,7 @@ var SUPPORTED_PACKAGES = {
|
|
|
237
493
|
service: [
|
|
238
494
|
// internal or community driver services
|
|
239
495
|
{ name: "visual", value: "@wdio/visual-service$--$visual" },
|
|
496
|
+
{ name: "ai", value: "@wdio/ai-service$--$ai" },
|
|
240
497
|
{ name: "vite", value: "wdio-vite-service$--$vite" },
|
|
241
498
|
{ name: "nuxt", value: "wdio-nuxt-service$--$nuxt" },
|
|
242
499
|
{ name: "firefox-profile", value: "@wdio/firefox-profile-service$--$firefox-profile" },
|
|
@@ -828,6 +1085,11 @@ var QUESTIONNAIRE = [{
|
|
|
828
1085
|
/* istanbul ignore next */
|
|
829
1086
|
(answers) => answers.generateTestFiles && usesSerenity(answers)
|
|
830
1087
|
)
|
|
1088
|
+
}, {
|
|
1089
|
+
type: "confirm",
|
|
1090
|
+
name: "agentSupport",
|
|
1091
|
+
message: "Set up coding agent support (AGENTS.md section and wdio-session skill)?",
|
|
1092
|
+
default: true
|
|
831
1093
|
}, {
|
|
832
1094
|
type: "checkbox",
|
|
833
1095
|
name: "reporters",
|
package/build/utils.d.ts
CHANGED
|
@@ -1,9 +1,18 @@
|
|
|
1
1
|
import type { SpawnOptions } from 'node:child_process';
|
|
2
2
|
import type { ParsedAnswers, ProjectProps, Questionnair, SupportedPackage } from './types.js';
|
|
3
|
-
|
|
3
|
+
/**
|
|
4
|
+
* @param passUsageError exit with the child's code 2 (a usage error the child
|
|
5
|
+
* already explained, e.g. `wdio config` rejecting a flag)
|
|
6
|
+
* instead of reporting a generic failure
|
|
7
|
+
*/
|
|
8
|
+
export declare function runProgram(command: string, args: string[], options: SpawnOptions, passUsageError?: boolean): Promise<void>;
|
|
4
9
|
export declare function getPackageVersion(): Promise<string>;
|
|
5
10
|
export declare function convertPackageHashToObject(pkg: string, hash?: string): SupportedPackage;
|
|
6
|
-
|
|
11
|
+
/**
|
|
12
|
+
* @param yes fill in defaults instead of prompting
|
|
13
|
+
* @param flagAnswers answers given as command line flags, these questions are not asked
|
|
14
|
+
*/
|
|
15
|
+
export declare function getAnswers(yes: boolean, flagAnswers?: Partial<Questionnair>): Promise<Questionnair>;
|
|
7
16
|
/**
|
|
8
17
|
* Receive project properties
|
|
9
18
|
* @returns {@type ProjectProps} if a package.json can be found in cwd or parent directories, otherwise undefined
|
|
@@ -27,7 +36,7 @@ export declare function getProjectRoot(parsedAnswers?: Questionnair): Promise<st
|
|
|
27
36
|
/**
|
|
28
37
|
* create package.json if not already existing
|
|
29
38
|
*/
|
|
30
|
-
export declare function createPackageJSON(parsedAnswers: ParsedAnswers): Promise<
|
|
39
|
+
export declare function createPackageJSON(parsedAnswers: ParsedAnswers): Promise<void>;
|
|
31
40
|
/**
|
|
32
41
|
* set up TypeScript if it is desired but not installed
|
|
33
42
|
*/
|
|
@@ -37,7 +46,10 @@ export declare function addServiceDeps(names: SupportedPackage[], packages: stri
|
|
|
37
46
|
export declare function createWDIOConfig(parsedAnswers: ParsedAnswers): Promise<void>;
|
|
38
47
|
export declare const renderFile: (path: string, data: Record<string, unknown>) => Promise<string>;
|
|
39
48
|
export declare function createWDIOScript(parsedAnswers: ParsedAnswers): Promise<boolean>;
|
|
40
|
-
|
|
49
|
+
/**
|
|
50
|
+
* @param yes `--yes` was passed, so don't prompt
|
|
51
|
+
*/
|
|
52
|
+
export declare function runAppiumInstaller(parsedAnswers: ParsedAnswers, yes?: boolean): Promise<void | import("execa").Result<{
|
|
41
53
|
stdio: "inherit";
|
|
42
54
|
}>>;
|
|
43
55
|
export declare function getSerenityPackages(answers: Questionnair): string[];
|
package/build/utils.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"m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"Install and setup a WebdriverIO project with all its dependencies in a single run",
|
|
5
5
|
"author": "WebdriverIO Team <mail@webdriver.io>",
|
|
6
6
|
"homepage": "https://github.com/webdriverio/webdriverio/tree/main/packages/create-wdio",
|
|
@@ -29,9 +29,9 @@
|
|
|
29
29
|
}
|
|
30
30
|
},
|
|
31
31
|
"types": "./build/index.d.ts",
|
|
32
|
-
"typeScriptVersion": "
|
|
32
|
+
"typeScriptVersion": "6.0.3",
|
|
33
33
|
"engines": {
|
|
34
|
-
"node": ">=
|
|
34
|
+
"node": ">=22.19.0"
|
|
35
35
|
},
|
|
36
36
|
"repository": {
|
|
37
37
|
"type": "git",
|
|
@@ -61,10 +61,9 @@
|
|
|
61
61
|
"inquirer": "^12.7.0",
|
|
62
62
|
"normalize-package-data": "^7.0.0",
|
|
63
63
|
"read-pkg-up": "^10.1.0",
|
|
64
|
-
"recursive-readdir": "^2.2.3",
|
|
65
64
|
"semver": "^7.6.3",
|
|
66
65
|
"type-fest": "^4.41.0",
|
|
67
|
-
"yargs": "^
|
|
66
|
+
"yargs": "^18.2.0"
|
|
68
67
|
},
|
|
69
68
|
"devDependencies": {
|
|
70
69
|
"@types/cross-spawn": "^6.0.6",
|
|
@@ -77,5 +76,5 @@
|
|
|
77
76
|
"publishConfig": {
|
|
78
77
|
"access": "public"
|
|
79
78
|
},
|
|
80
|
-
"gitHead": "
|
|
79
|
+
"gitHead": "ce13bea839fb037eceda429dbf94cd387b7c3584"
|
|
81
80
|
}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: wdio-session
|
|
3
|
+
description: Drive browsers, mobile apps and desktop apps with WebdriverIO from the shell to explore UI, verify changes and write tests.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# wdio session
|
|
7
|
+
|
|
8
|
+
`wdio session` keeps a WebdriverIO session alive between short shell commands. Use it to explore a UI, check a change, and turn the steps that worked into a test.
|
|
9
|
+
|
|
10
|
+
Use it when you need to see or drive a real browser, mobile app, or desktop app. Use `curl` or `fetch` instead when the question is only about an HTTP API.
|
|
11
|
+
|
|
12
|
+
## 1. Discover commands with `--help`
|
|
13
|
+
|
|
14
|
+
This file covers the core loop only. The CLI documents itself, and its help always matches the installed version:
|
|
15
|
+
|
|
16
|
+
```sh
|
|
17
|
+
npx wdio session --help # the workflow, every action by group, global flags, exit codes
|
|
18
|
+
npx wdio session <action> --help # arguments, flags, platforms, examples and related actions
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Run `<action> --help` before you use an action for the first time in a task. Don't guess flags: an unknown flag fails with exit code 2.
|
|
22
|
+
|
|
23
|
+
## 2. The loop
|
|
24
|
+
|
|
25
|
+
```sh
|
|
26
|
+
npx wdio session open chrome http://localhost:3000
|
|
27
|
+
npx wdio session snapshot -i
|
|
28
|
+
npx wdio session click e3 && npx wdio session wait --text "Cart (1)" && npx wdio session snapshot -i
|
|
29
|
+
npx wdio session export --out test/specs/cart.e2e.ts
|
|
30
|
+
npx wdio session close
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
- **Open once.** Reuse the `default` session. Pass `-s <name>` only when you need two sessions at once. `open --help` lists every target: browsers, Android, iOS, macOS, Windows, Electron, Tauri, Dioxus, a wdio config, and cloud providers.
|
|
34
|
+
- **Observe before acting.** `snapshot -i` lists interactive elements with refs like `button "Add to cart" [ref=e3]`. Use `find <text>` on large pages. Take a screenshot only when the question is about layout.
|
|
35
|
+
- **Act on refs.** Refs stay valid while the element exists. After navigation, take a fresh snapshot.
|
|
36
|
+
- **Chain steps with `&&`.** One shell call per act-wait-observe step is faster than separate calls, and a failing step stops the chain.
|
|
37
|
+
- **Wait for a condition, not a time.** Use `wait <ref>`, `wait --text`, `wait --url` or `wait --load networkidle` instead of `sleep`.
|
|
38
|
+
- **Read before you assert.** `get text e1`, `get url` and `is visible e1` print values. Put assertions in `exec`.
|
|
39
|
+
|
|
40
|
+
## 3. Code
|
|
41
|
+
|
|
42
|
+
Use `exec` for loops, conditions and assertions. Pipe longer code on stdin:
|
|
43
|
+
|
|
44
|
+
```sh
|
|
45
|
+
npx wdio session exec -e 'await expect($("h1")).toHaveText("Cart")'
|
|
46
|
+
npx wdio session <<'JS'
|
|
47
|
+
await $('aria/Sign in').click()
|
|
48
|
+
await expect(browser).toHaveUrl(expect.stringContaining('/dashboard'))
|
|
49
|
+
JS
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
WebdriverIO v10 rules:
|
|
53
|
+
|
|
54
|
+
- Always `await` commands.
|
|
55
|
+
- `$` returns exactly one element. More than one match throws `StrictSelectorError`. A missing element stays unresolved until a command uses it.
|
|
56
|
+
- There is no sync mode and no `browser.element`.
|
|
57
|
+
- In the shell, wrap code in single quotes so `$(…)` is not run as command substitution.
|
|
58
|
+
|
|
59
|
+
Add a helper under `.wdio/helpers/` instead of a long `exec` script. Helpers become custom commands in the exported test.
|
|
60
|
+
|
|
61
|
+
## 4. Turn it into a test
|
|
62
|
+
|
|
63
|
+
Every action prints the WebdriverIO code it ran (`→ …`). `export` writes those steps as a spec:
|
|
64
|
+
|
|
65
|
+
```sh
|
|
66
|
+
npx wdio session export --out test/specs/cart.e2e.ts
|
|
67
|
+
npx wdio run wdio.conf.ts --spec test/specs/cart.e2e.ts
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
No `wdio.conf.ts` yet? Create the project without prompts. Every wizard question has a flag, `npm init wdio@latest -- --help` lists them:
|
|
71
|
+
|
|
72
|
+
```sh
|
|
73
|
+
npm init wdio@latest . -- --yes --typescript --framework mocha --browsers chrome --reporters spec
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
## 5. Debug a failing test
|
|
77
|
+
|
|
78
|
+
```sh
|
|
79
|
+
npx wdio run wdio.conf.ts --debug=agent
|
|
80
|
+
npx wdio session -s debug-0-0 snapshot -i
|
|
81
|
+
npx wdio session -s debug-0-0 resume
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
`close` on that session fails the paused test.
|
|
85
|
+
|
|
86
|
+
## 6. Errors
|
|
87
|
+
|
|
88
|
+
| Exit | Meaning |
|
|
89
|
+
| --- | --- |
|
|
90
|
+
| 0 | Success |
|
|
91
|
+
| 1 | The action or your code failed |
|
|
92
|
+
| 2 | Usage error: check `<action> --help` |
|
|
93
|
+
| 3 | Missing dependency or credentials |
|
|
94
|
+
| 4 | No session with that name |
|
|
95
|
+
|
|
96
|
+
Errors print a hint on the next line. `npx wdio session doctor` checks the machine; `doctor <target>` checks one target.
|