You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: playwright-demo/README.md
+12-15Lines changed: 12 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,8 @@
1
-
# playwright-demo
1
+
# Playwright Demo
2
+
3
+
This is a demo to show how to use Playwright to do some automation tasks.
4
+
5
+
If you want to use Playwright with Vitest, please refer to [puppeteer-with-vitest-demo](../puppeteer-with-vitest-demo) for the usage.
2
6
3
7
## Steps
4
8
@@ -15,26 +19,19 @@ Refer to this document if your want to use other models like Qwen: https://midsc
15
19
16
20
### Run demo
17
21
18
-
run e2e test
19
-
20
22
```bash
21
-
pnpm install
23
+
npm install
22
24
23
-
# run e2e test
24
-
pnpm run e2e
25
+
# run demo.ts
26
+
npx tsx demo.ts
25
27
26
-
#prefer using cache
27
-
pnpm run e2e:cache
28
+
#run extract-data.ts
29
+
npx tsx extract-data.ts
28
30
29
-
# run e2e with playwright ui, remember to click the little "Play" button on the upper-left corner
30
-
pnpm run e2e:ui
31
-
32
-
# run e2e with playwright ui + cache
33
-
pnpm run e2e:ui:cache
31
+
# run demo with a `.runYaml` call
32
+
npx tsx demo-run-yaml.ts
34
33
```
35
34
36
-
After the above command executes successfully, the console will output: `Midscene - report file updated: ./current_cwd/midscene_run/report/some_id.html.` You can open this file in a browser to view the report.
Refer to this document if your want to use other models like Qwen: https://midscenejs.com/choose-a-model
15
+
16
+
### Run demo
17
+
18
+
run e2e test
19
+
20
+
```bash
21
+
pnpm install
22
+
23
+
# run e2e test
24
+
pnpm run e2e
25
+
26
+
# prefer using cache
27
+
pnpm run e2e:cache
28
+
29
+
# run e2e with playwright ui, remember to click the little "Play" button on the upper-left corner
30
+
pnpm run e2e:ui
31
+
32
+
# run e2e with playwright ui + cache
33
+
pnpm run e2e:ui:cache
34
+
```
35
+
36
+
After the above command executes successfully, the console will output: `Midscene - report file updated: ./current_cwd/midscene_run/report/some_id.html.` You can open this file in a browser to view the report.
0 commit comments