autoforge-ai 0.1.12 → 0.1.13
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/.claude/commands/review-pr.md +49 -18
- package/.claude/skills/playwright-cli/SKILL.md +259 -259
- package/.claude/skills/playwright-cli/references/request-mocking.md +87 -87
- package/.claude/skills/playwright-cli/references/running-code.md +232 -232
- package/.claude/skills/playwright-cli/references/session-management.md +169 -169
- package/.claude/skills/playwright-cli/references/storage-state.md +275 -275
- package/.claude/skills/playwright-cli/references/test-generation.md +88 -88
- package/.claude/skills/playwright-cli/references/tracing.md +139 -139
- package/.claude/skills/playwright-cli/references/video-recording.md +43 -43
- package/agent.py +2 -2
- package/api/database.py +27 -2
- package/autoforge_paths.py +10 -0
- package/mcp_server/feature_mcp.py +115 -5
- package/package.json +1 -1
- package/parallel_orchestrator.py +52 -1
- package/progress.py +38 -21
- package/registry.py +2 -1
- package/server/routers/agent.py +28 -0
- package/server/routers/features.py +76 -1
- package/server/routers/projects.py +1 -1
- package/server/schemas.py +28 -2
- package/server/services/process_manager.py +80 -9
- package/server/websocket.py +37 -4
- package/ui/dist/assets/index-CxuZ3Odc.js +95 -0
- package/ui/dist/assets/index-JNM7eUj7.css +1 -0
- package/ui/dist/assets/vendor-utils-BaL7xioT.js +2 -0
- package/ui/dist/index.html +3 -3
- package/ui/dist/assets/index-Dbvdx_Pa.js +0 -93
- package/ui/dist/assets/index-DnMjA6om.css +0 -1
- package/ui/dist/assets/vendor-utils-DhWVNeqw.js +0 -2
|
@@ -12,7 +12,13 @@ Pull request(s): $ARGUMENTS
|
|
|
12
12
|
1. **Retrieve PR Details**
|
|
13
13
|
- Use the GH CLI tool to retrieve the details (descriptions, diffs, comments, feedback, reviews, etc)
|
|
14
14
|
|
|
15
|
-
2. **
|
|
15
|
+
2. **Check for Merge Conflicts**
|
|
16
|
+
- After retrieving PR details, check whether the PR has merge conflicts against the target branch
|
|
17
|
+
- Use `gh pr view <number> --json mergeable,mergeStateStatus` or attempt a local merge check with `git merge-tree`
|
|
18
|
+
- If conflicts exist, note the conflicting files — these must be resolved on the PR branch before merging
|
|
19
|
+
- Surface conflicts early so they inform the rest of the review (don't discover them as a surprise at merge time)
|
|
20
|
+
|
|
21
|
+
3. **Assess PR Complexity**
|
|
16
22
|
|
|
17
23
|
After retrieving PR details, assess complexity based on:
|
|
18
24
|
- Number of files changed
|
|
@@ -34,13 +40,13 @@ Pull request(s): $ARGUMENTS
|
|
|
34
40
|
- >15 files, OR >500 lines, OR >2 contributors, OR touches core architecture
|
|
35
41
|
- Spawn up to 3 agents to analyze different aspects (e.g., security, performance, architecture)
|
|
36
42
|
|
|
37
|
-
|
|
43
|
+
4. **Analyze Codebase Impact**
|
|
38
44
|
- Based on the complexity tier determined above, spawn the appropriate number of deep dive subagents
|
|
39
45
|
- For Simple PRs: analyze directly without spawning agents
|
|
40
46
|
- For Medium PRs: spawn 1-2 agents focusing on the most impacted areas
|
|
41
47
|
- For Complex PRs: spawn up to 3 agents to cover security, performance, and architectural concerns
|
|
42
48
|
|
|
43
|
-
|
|
49
|
+
5. **PR Scope & Title Alignment Check**
|
|
44
50
|
- Compare the PR title and description against the actual diff content
|
|
45
51
|
- Check whether the PR is focused on a single coherent change or contains multiple unrelated changes
|
|
46
52
|
- If the title/description describe one thing but the PR contains significantly more (e.g., title says "fix typo in README" but the diff touches 20 files across multiple domains), flag this as a **scope mismatch**
|
|
@@ -48,28 +54,53 @@ Pull request(s): $ARGUMENTS
|
|
|
48
54
|
- Suggest specific ways to split the PR (e.g., "separate the refactor from the feature addition")
|
|
49
55
|
- Reviewing large, unfocused PRs is impractical and error-prone; the review cannot provide adequate assurance for such changes
|
|
50
56
|
|
|
51
|
-
|
|
57
|
+
6. **Vision Alignment Check**
|
|
52
58
|
- Read the project's README.md and CLAUDE.md to understand the application's core purpose
|
|
53
59
|
- Assess whether this PR aligns with the application's intended functionality
|
|
54
60
|
- If the changes deviate significantly from the core vision or add functionality that doesn't serve the application's purpose, note this in the review
|
|
55
61
|
- This is not a blocker, but should be flagged for the reviewer's consideration
|
|
56
62
|
|
|
57
|
-
|
|
63
|
+
7. **Safety Assessment**
|
|
58
64
|
- Provide a review on whether the PR is safe to merge as-is
|
|
59
65
|
- Provide any feedback in terms of risk level
|
|
60
66
|
|
|
61
|
-
|
|
67
|
+
8. **Improvements**
|
|
62
68
|
- Propose any improvements in terms of importance and complexity
|
|
63
69
|
|
|
64
|
-
|
|
65
|
-
- Based on all findings, provide a clear
|
|
66
|
-
- If
|
|
67
|
-
- If
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
70
|
+
9. **Merge Recommendation**
|
|
71
|
+
- Based on all findings (including merge conflict status from step 2), provide a clear recommendation
|
|
72
|
+
- **If no concerns and no conflicts**: recommend merging as-is
|
|
73
|
+
- **If concerns are minor/fixable and/or merge conflicts exist**: recommend fixing on the PR branch first, then merging. Never merge a PR with known issues to main — always fix on the PR branch first
|
|
74
|
+
- **If there are significant concerns** (bugs, security issues, architectural problems, scope mismatch) that require author input or are too risky to fix: recommend **not merging** and explain what needs to be resolved
|
|
75
|
+
|
|
76
|
+
10. **TLDR**
|
|
77
|
+
- End the review with a `## TLDR` section
|
|
78
|
+
- In 3-5 bullet points maximum, summarize:
|
|
79
|
+
- What this PR is actually about (one sentence)
|
|
80
|
+
- Merge conflict status (clean or conflicting files)
|
|
81
|
+
- The key concerns, if any (or "no significant concerns")
|
|
82
|
+
- **Verdict: MERGE** / **MERGE (after fixes)** / **DON'T MERGE** with a one-line reason
|
|
83
|
+
- This section should be scannable in under 10 seconds
|
|
84
|
+
|
|
85
|
+
Verdict definitions:
|
|
86
|
+
- **MERGE** — no issues, clean to merge as-is
|
|
87
|
+
- **MERGE (after fixes)** — minor issues and/or conflicts exist, but can be resolved on the PR branch first, then merged
|
|
88
|
+
- **DON'T MERGE** — needs author attention, too complex or risky to fix without their input
|
|
89
|
+
|
|
90
|
+
11. **Post-Review Action**
|
|
91
|
+
- Immediately after the TLDR, provide a `## Recommended Action` section
|
|
92
|
+
- Based on the verdict, recommend one of the following actions:
|
|
93
|
+
|
|
94
|
+
**If verdict is MERGE (no concerns):**
|
|
95
|
+
- Merge as-is. No further action needed.
|
|
96
|
+
|
|
97
|
+
**If verdict is MERGE (after fixes):**
|
|
98
|
+
- List the specific changes that need to be made (fixes, conflict resolutions, etc.)
|
|
99
|
+
- Offer to: check out the PR branch, resolve any merge conflicts, apply the minor fixes identified during review, push the updated branch, then merge the now-clean PR
|
|
100
|
+
- Ask the user: *"Should I check out the PR branch, apply these fixes, and then merge?"*
|
|
101
|
+
- **Never merge first and fix on main later** — always fix on the PR branch before merging
|
|
102
|
+
|
|
103
|
+
**If verdict is DON'T MERGE:**
|
|
104
|
+
- If the issues are contained and you are confident you can fix them: offer the same workflow as "MERGE (after fixes)" — check out the PR branch, apply fixes, push, then merge
|
|
105
|
+
- If the issues are too complex, risky, or require author input (e.g., design decisions, major refactors, unclear intent): recommend sending the PR back to the author with specific feedback on what needs to change
|
|
106
|
+
- Be honest about your confidence level — if you're unsure whether you can address the concerns correctly, say so and defer to the author
|
|
@@ -1,259 +1,259 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: playwright-cli
|
|
3
|
-
description: Automates browser interactions for web testing, form filling, screenshots, and data extraction. Use when the user needs to navigate websites, interact with web pages, fill forms, take screenshots, test web applications, or extract information from web pages.
|
|
4
|
-
allowed-tools: Bash(playwright-cli:*)
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# Browser Automation with playwright-cli
|
|
8
|
-
|
|
9
|
-
## Quick start
|
|
10
|
-
|
|
11
|
-
```bash
|
|
12
|
-
# open new browser
|
|
13
|
-
playwright-cli open
|
|
14
|
-
# navigate to a page
|
|
15
|
-
playwright-cli goto https://playwright.dev
|
|
16
|
-
# interact with the page using refs from the snapshot
|
|
17
|
-
playwright-cli click e15
|
|
18
|
-
playwright-cli type "page.click"
|
|
19
|
-
playwright-cli press Enter
|
|
20
|
-
# take a screenshot
|
|
21
|
-
playwright-cli screenshot
|
|
22
|
-
# close the browser
|
|
23
|
-
playwright-cli close
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
## Commands
|
|
27
|
-
|
|
28
|
-
### Core
|
|
29
|
-
|
|
30
|
-
```bash
|
|
31
|
-
playwright-cli open
|
|
32
|
-
# open and navigate right away
|
|
33
|
-
playwright-cli open https://example.com/
|
|
34
|
-
playwright-cli goto https://playwright.dev
|
|
35
|
-
playwright-cli type "search query"
|
|
36
|
-
playwright-cli click e3
|
|
37
|
-
playwright-cli dblclick e7
|
|
38
|
-
playwright-cli fill e5 "user@example.com"
|
|
39
|
-
playwright-cli drag e2 e8
|
|
40
|
-
playwright-cli hover e4
|
|
41
|
-
playwright-cli select e9 "option-value"
|
|
42
|
-
playwright-cli upload ./document.pdf
|
|
43
|
-
playwright-cli check e12
|
|
44
|
-
playwright-cli uncheck e12
|
|
45
|
-
playwright-cli snapshot
|
|
46
|
-
playwright-cli snapshot --filename=after-click.yaml
|
|
47
|
-
playwright-cli eval "document.title"
|
|
48
|
-
playwright-cli eval "el => el.textContent" e5
|
|
49
|
-
playwright-cli dialog-accept
|
|
50
|
-
playwright-cli dialog-accept "confirmation text"
|
|
51
|
-
playwright-cli dialog-dismiss
|
|
52
|
-
playwright-cli resize 1920 1080
|
|
53
|
-
playwright-cli close
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
### Navigation
|
|
57
|
-
|
|
58
|
-
```bash
|
|
59
|
-
playwright-cli go-back
|
|
60
|
-
playwright-cli go-forward
|
|
61
|
-
playwright-cli reload
|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
### Keyboard
|
|
65
|
-
|
|
66
|
-
```bash
|
|
67
|
-
playwright-cli press Enter
|
|
68
|
-
playwright-cli press ArrowDown
|
|
69
|
-
playwright-cli keydown Shift
|
|
70
|
-
playwright-cli keyup Shift
|
|
71
|
-
```
|
|
72
|
-
|
|
73
|
-
### Mouse
|
|
74
|
-
|
|
75
|
-
```bash
|
|
76
|
-
playwright-cli mousemove 150 300
|
|
77
|
-
playwright-cli mousedown
|
|
78
|
-
playwright-cli mousedown right
|
|
79
|
-
playwright-cli mouseup
|
|
80
|
-
playwright-cli mouseup right
|
|
81
|
-
playwright-cli mousewheel 0 100
|
|
82
|
-
```
|
|
83
|
-
|
|
84
|
-
### Save as
|
|
85
|
-
|
|
86
|
-
```bash
|
|
87
|
-
playwright-cli screenshot
|
|
88
|
-
playwright-cli screenshot e5
|
|
89
|
-
playwright-cli screenshot --filename=page.png
|
|
90
|
-
playwright-cli pdf --filename=page.pdf
|
|
91
|
-
```
|
|
92
|
-
|
|
93
|
-
### Tabs
|
|
94
|
-
|
|
95
|
-
```bash
|
|
96
|
-
playwright-cli tab-list
|
|
97
|
-
playwright-cli tab-new
|
|
98
|
-
playwright-cli tab-new https://example.com/page
|
|
99
|
-
playwright-cli tab-close
|
|
100
|
-
playwright-cli tab-close 2
|
|
101
|
-
playwright-cli tab-select 0
|
|
102
|
-
```
|
|
103
|
-
|
|
104
|
-
### Storage
|
|
105
|
-
|
|
106
|
-
```bash
|
|
107
|
-
playwright-cli state-save
|
|
108
|
-
playwright-cli state-save auth.json
|
|
109
|
-
playwright-cli state-load auth.json
|
|
110
|
-
|
|
111
|
-
# Cookies
|
|
112
|
-
playwright-cli cookie-list
|
|
113
|
-
playwright-cli cookie-list --domain=example.com
|
|
114
|
-
playwright-cli cookie-get session_id
|
|
115
|
-
playwright-cli cookie-set session_id abc123
|
|
116
|
-
playwright-cli cookie-set session_id abc123 --domain=example.com --httpOnly --secure
|
|
117
|
-
playwright-cli cookie-delete session_id
|
|
118
|
-
playwright-cli cookie-clear
|
|
119
|
-
|
|
120
|
-
# LocalStorage
|
|
121
|
-
playwright-cli localstorage-list
|
|
122
|
-
playwright-cli localstorage-get theme
|
|
123
|
-
playwright-cli localstorage-set theme dark
|
|
124
|
-
playwright-cli localstorage-delete theme
|
|
125
|
-
playwright-cli localstorage-clear
|
|
126
|
-
|
|
127
|
-
# SessionStorage
|
|
128
|
-
playwright-cli sessionstorage-list
|
|
129
|
-
playwright-cli sessionstorage-get step
|
|
130
|
-
playwright-cli sessionstorage-set step 3
|
|
131
|
-
playwright-cli sessionstorage-delete step
|
|
132
|
-
playwright-cli sessionstorage-clear
|
|
133
|
-
```
|
|
134
|
-
|
|
135
|
-
### Network
|
|
136
|
-
|
|
137
|
-
```bash
|
|
138
|
-
playwright-cli route "**/*.jpg" --status=404
|
|
139
|
-
playwright-cli route "https://api.example.com/**" --body='{"mock": true}'
|
|
140
|
-
playwright-cli route-list
|
|
141
|
-
playwright-cli unroute "**/*.jpg"
|
|
142
|
-
playwright-cli unroute
|
|
143
|
-
```
|
|
144
|
-
|
|
145
|
-
### DevTools
|
|
146
|
-
|
|
147
|
-
```bash
|
|
148
|
-
playwright-cli console
|
|
149
|
-
playwright-cli console warning
|
|
150
|
-
playwright-cli network
|
|
151
|
-
playwright-cli run-code "async page => await page.context().grantPermissions(['geolocation'])"
|
|
152
|
-
playwright-cli tracing-start
|
|
153
|
-
playwright-cli tracing-stop
|
|
154
|
-
playwright-cli video-start
|
|
155
|
-
playwright-cli video-stop video.webm
|
|
156
|
-
```
|
|
157
|
-
|
|
158
|
-
### Install
|
|
159
|
-
|
|
160
|
-
```bash
|
|
161
|
-
playwright-cli install --skills
|
|
162
|
-
playwright-cli install-browser
|
|
163
|
-
```
|
|
164
|
-
|
|
165
|
-
### Configuration
|
|
166
|
-
```bash
|
|
167
|
-
# Use specific browser when creating session
|
|
168
|
-
playwright-cli open --browser=chrome
|
|
169
|
-
playwright-cli open --browser=firefox
|
|
170
|
-
playwright-cli open --browser=webkit
|
|
171
|
-
playwright-cli open --browser=msedge
|
|
172
|
-
# Connect to browser via extension
|
|
173
|
-
playwright-cli open --extension
|
|
174
|
-
|
|
175
|
-
# Use persistent profile (by default profile is in-memory)
|
|
176
|
-
playwright-cli open --persistent
|
|
177
|
-
# Use persistent profile with custom directory
|
|
178
|
-
playwright-cli open --profile=/path/to/profile
|
|
179
|
-
|
|
180
|
-
# Start with config file
|
|
181
|
-
playwright-cli open --config=my-config.json
|
|
182
|
-
|
|
183
|
-
# Close the browser
|
|
184
|
-
playwright-cli close
|
|
185
|
-
# Delete user data for the default session
|
|
186
|
-
playwright-cli delete-data
|
|
187
|
-
```
|
|
188
|
-
|
|
189
|
-
### Browser Sessions
|
|
190
|
-
|
|
191
|
-
```bash
|
|
192
|
-
# create new browser session named "mysession" with persistent profile
|
|
193
|
-
playwright-cli -s=mysession open example.com --persistent
|
|
194
|
-
# same with manually specified profile directory (use when requested explicitly)
|
|
195
|
-
playwright-cli -s=mysession open example.com --profile=/path/to/profile
|
|
196
|
-
playwright-cli -s=mysession click e6
|
|
197
|
-
playwright-cli -s=mysession close # stop a named browser
|
|
198
|
-
playwright-cli -s=mysession delete-data # delete user data for persistent session
|
|
199
|
-
|
|
200
|
-
playwright-cli list
|
|
201
|
-
# Close all browsers
|
|
202
|
-
playwright-cli close-all
|
|
203
|
-
# Forcefully kill all browser processes
|
|
204
|
-
playwright-cli kill-all
|
|
205
|
-
```
|
|
206
|
-
|
|
207
|
-
## Example: Form submission
|
|
208
|
-
|
|
209
|
-
```bash
|
|
210
|
-
playwright-cli open https://example.com/form
|
|
211
|
-
playwright-cli snapshot
|
|
212
|
-
|
|
213
|
-
playwright-cli fill e1 "user@example.com"
|
|
214
|
-
playwright-cli fill e2 "password123"
|
|
215
|
-
playwright-cli click e3
|
|
216
|
-
playwright-cli snapshot
|
|
217
|
-
playwright-cli close
|
|
218
|
-
```
|
|
219
|
-
|
|
220
|
-
## Example: Multi-tab workflow
|
|
221
|
-
|
|
222
|
-
```bash
|
|
223
|
-
playwright-cli open https://example.com
|
|
224
|
-
playwright-cli tab-new https://example.com/other
|
|
225
|
-
playwright-cli tab-list
|
|
226
|
-
playwright-cli tab-select 0
|
|
227
|
-
playwright-cli snapshot
|
|
228
|
-
playwright-cli close
|
|
229
|
-
```
|
|
230
|
-
|
|
231
|
-
## Example: Debugging with DevTools
|
|
232
|
-
|
|
233
|
-
```bash
|
|
234
|
-
playwright-cli open https://example.com
|
|
235
|
-
playwright-cli click e4
|
|
236
|
-
playwright-cli fill e7 "test"
|
|
237
|
-
playwright-cli console
|
|
238
|
-
playwright-cli network
|
|
239
|
-
playwright-cli close
|
|
240
|
-
```
|
|
241
|
-
|
|
242
|
-
```bash
|
|
243
|
-
playwright-cli open https://example.com
|
|
244
|
-
playwright-cli tracing-start
|
|
245
|
-
playwright-cli click e4
|
|
246
|
-
playwright-cli fill e7 "test"
|
|
247
|
-
playwright-cli tracing-stop
|
|
248
|
-
playwright-cli close
|
|
249
|
-
```
|
|
250
|
-
|
|
251
|
-
## Specific tasks
|
|
252
|
-
|
|
253
|
-
* **Request mocking** [references/request-mocking.md](references/request-mocking.md)
|
|
254
|
-
* **Running Playwright code** [references/running-code.md](references/running-code.md)
|
|
255
|
-
* **Browser session management** [references/session-management.md](references/session-management.md)
|
|
256
|
-
* **Storage state (cookies, localStorage)** [references/storage-state.md](references/storage-state.md)
|
|
257
|
-
* **Test generation** [references/test-generation.md](references/test-generation.md)
|
|
258
|
-
* **Tracing** [references/tracing.md](references/tracing.md)
|
|
259
|
-
* **Video recording** [references/video-recording.md](references/video-recording.md)
|
|
1
|
+
---
|
|
2
|
+
name: playwright-cli
|
|
3
|
+
description: Automates browser interactions for web testing, form filling, screenshots, and data extraction. Use when the user needs to navigate websites, interact with web pages, fill forms, take screenshots, test web applications, or extract information from web pages.
|
|
4
|
+
allowed-tools: Bash(playwright-cli:*)
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Browser Automation with playwright-cli
|
|
8
|
+
|
|
9
|
+
## Quick start
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
# open new browser
|
|
13
|
+
playwright-cli open
|
|
14
|
+
# navigate to a page
|
|
15
|
+
playwright-cli goto https://playwright.dev
|
|
16
|
+
# interact with the page using refs from the snapshot
|
|
17
|
+
playwright-cli click e15
|
|
18
|
+
playwright-cli type "page.click"
|
|
19
|
+
playwright-cli press Enter
|
|
20
|
+
# take a screenshot
|
|
21
|
+
playwright-cli screenshot
|
|
22
|
+
# close the browser
|
|
23
|
+
playwright-cli close
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Commands
|
|
27
|
+
|
|
28
|
+
### Core
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
playwright-cli open
|
|
32
|
+
# open and navigate right away
|
|
33
|
+
playwright-cli open https://example.com/
|
|
34
|
+
playwright-cli goto https://playwright.dev
|
|
35
|
+
playwright-cli type "search query"
|
|
36
|
+
playwright-cli click e3
|
|
37
|
+
playwright-cli dblclick e7
|
|
38
|
+
playwright-cli fill e5 "user@example.com"
|
|
39
|
+
playwright-cli drag e2 e8
|
|
40
|
+
playwright-cli hover e4
|
|
41
|
+
playwright-cli select e9 "option-value"
|
|
42
|
+
playwright-cli upload ./document.pdf
|
|
43
|
+
playwright-cli check e12
|
|
44
|
+
playwright-cli uncheck e12
|
|
45
|
+
playwright-cli snapshot
|
|
46
|
+
playwright-cli snapshot --filename=after-click.yaml
|
|
47
|
+
playwright-cli eval "document.title"
|
|
48
|
+
playwright-cli eval "el => el.textContent" e5
|
|
49
|
+
playwright-cli dialog-accept
|
|
50
|
+
playwright-cli dialog-accept "confirmation text"
|
|
51
|
+
playwright-cli dialog-dismiss
|
|
52
|
+
playwright-cli resize 1920 1080
|
|
53
|
+
playwright-cli close
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### Navigation
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
playwright-cli go-back
|
|
60
|
+
playwright-cli go-forward
|
|
61
|
+
playwright-cli reload
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
### Keyboard
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
playwright-cli press Enter
|
|
68
|
+
playwright-cli press ArrowDown
|
|
69
|
+
playwright-cli keydown Shift
|
|
70
|
+
playwright-cli keyup Shift
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
### Mouse
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
playwright-cli mousemove 150 300
|
|
77
|
+
playwright-cli mousedown
|
|
78
|
+
playwright-cli mousedown right
|
|
79
|
+
playwright-cli mouseup
|
|
80
|
+
playwright-cli mouseup right
|
|
81
|
+
playwright-cli mousewheel 0 100
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
### Save as
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
playwright-cli screenshot
|
|
88
|
+
playwright-cli screenshot e5
|
|
89
|
+
playwright-cli screenshot --filename=page.png
|
|
90
|
+
playwright-cli pdf --filename=page.pdf
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
### Tabs
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
playwright-cli tab-list
|
|
97
|
+
playwright-cli tab-new
|
|
98
|
+
playwright-cli tab-new https://example.com/page
|
|
99
|
+
playwright-cli tab-close
|
|
100
|
+
playwright-cli tab-close 2
|
|
101
|
+
playwright-cli tab-select 0
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
### Storage
|
|
105
|
+
|
|
106
|
+
```bash
|
|
107
|
+
playwright-cli state-save
|
|
108
|
+
playwright-cli state-save auth.json
|
|
109
|
+
playwright-cli state-load auth.json
|
|
110
|
+
|
|
111
|
+
# Cookies
|
|
112
|
+
playwright-cli cookie-list
|
|
113
|
+
playwright-cli cookie-list --domain=example.com
|
|
114
|
+
playwright-cli cookie-get session_id
|
|
115
|
+
playwright-cli cookie-set session_id abc123
|
|
116
|
+
playwright-cli cookie-set session_id abc123 --domain=example.com --httpOnly --secure
|
|
117
|
+
playwright-cli cookie-delete session_id
|
|
118
|
+
playwright-cli cookie-clear
|
|
119
|
+
|
|
120
|
+
# LocalStorage
|
|
121
|
+
playwright-cli localstorage-list
|
|
122
|
+
playwright-cli localstorage-get theme
|
|
123
|
+
playwright-cli localstorage-set theme dark
|
|
124
|
+
playwright-cli localstorage-delete theme
|
|
125
|
+
playwright-cli localstorage-clear
|
|
126
|
+
|
|
127
|
+
# SessionStorage
|
|
128
|
+
playwright-cli sessionstorage-list
|
|
129
|
+
playwright-cli sessionstorage-get step
|
|
130
|
+
playwright-cli sessionstorage-set step 3
|
|
131
|
+
playwright-cli sessionstorage-delete step
|
|
132
|
+
playwright-cli sessionstorage-clear
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
### Network
|
|
136
|
+
|
|
137
|
+
```bash
|
|
138
|
+
playwright-cli route "**/*.jpg" --status=404
|
|
139
|
+
playwright-cli route "https://api.example.com/**" --body='{"mock": true}'
|
|
140
|
+
playwright-cli route-list
|
|
141
|
+
playwright-cli unroute "**/*.jpg"
|
|
142
|
+
playwright-cli unroute
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
### DevTools
|
|
146
|
+
|
|
147
|
+
```bash
|
|
148
|
+
playwright-cli console
|
|
149
|
+
playwright-cli console warning
|
|
150
|
+
playwright-cli network
|
|
151
|
+
playwright-cli run-code "async page => await page.context().grantPermissions(['geolocation'])"
|
|
152
|
+
playwright-cli tracing-start
|
|
153
|
+
playwright-cli tracing-stop
|
|
154
|
+
playwright-cli video-start
|
|
155
|
+
playwright-cli video-stop video.webm
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
### Install
|
|
159
|
+
|
|
160
|
+
```bash
|
|
161
|
+
playwright-cli install --skills
|
|
162
|
+
playwright-cli install-browser
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
### Configuration
|
|
166
|
+
```bash
|
|
167
|
+
# Use specific browser when creating session
|
|
168
|
+
playwright-cli open --browser=chrome
|
|
169
|
+
playwright-cli open --browser=firefox
|
|
170
|
+
playwright-cli open --browser=webkit
|
|
171
|
+
playwright-cli open --browser=msedge
|
|
172
|
+
# Connect to browser via extension
|
|
173
|
+
playwright-cli open --extension
|
|
174
|
+
|
|
175
|
+
# Use persistent profile (by default profile is in-memory)
|
|
176
|
+
playwright-cli open --persistent
|
|
177
|
+
# Use persistent profile with custom directory
|
|
178
|
+
playwright-cli open --profile=/path/to/profile
|
|
179
|
+
|
|
180
|
+
# Start with config file
|
|
181
|
+
playwright-cli open --config=my-config.json
|
|
182
|
+
|
|
183
|
+
# Close the browser
|
|
184
|
+
playwright-cli close
|
|
185
|
+
# Delete user data for the default session
|
|
186
|
+
playwright-cli delete-data
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
### Browser Sessions
|
|
190
|
+
|
|
191
|
+
```bash
|
|
192
|
+
# create new browser session named "mysession" with persistent profile
|
|
193
|
+
playwright-cli -s=mysession open example.com --persistent
|
|
194
|
+
# same with manually specified profile directory (use when requested explicitly)
|
|
195
|
+
playwright-cli -s=mysession open example.com --profile=/path/to/profile
|
|
196
|
+
playwright-cli -s=mysession click e6
|
|
197
|
+
playwright-cli -s=mysession close # stop a named browser
|
|
198
|
+
playwright-cli -s=mysession delete-data # delete user data for persistent session
|
|
199
|
+
|
|
200
|
+
playwright-cli list
|
|
201
|
+
# Close all browsers
|
|
202
|
+
playwright-cli close-all
|
|
203
|
+
# Forcefully kill all browser processes
|
|
204
|
+
playwright-cli kill-all
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
## Example: Form submission
|
|
208
|
+
|
|
209
|
+
```bash
|
|
210
|
+
playwright-cli open https://example.com/form
|
|
211
|
+
playwright-cli snapshot
|
|
212
|
+
|
|
213
|
+
playwright-cli fill e1 "user@example.com"
|
|
214
|
+
playwright-cli fill e2 "password123"
|
|
215
|
+
playwright-cli click e3
|
|
216
|
+
playwright-cli snapshot
|
|
217
|
+
playwright-cli close
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
## Example: Multi-tab workflow
|
|
221
|
+
|
|
222
|
+
```bash
|
|
223
|
+
playwright-cli open https://example.com
|
|
224
|
+
playwright-cli tab-new https://example.com/other
|
|
225
|
+
playwright-cli tab-list
|
|
226
|
+
playwright-cli tab-select 0
|
|
227
|
+
playwright-cli snapshot
|
|
228
|
+
playwright-cli close
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
## Example: Debugging with DevTools
|
|
232
|
+
|
|
233
|
+
```bash
|
|
234
|
+
playwright-cli open https://example.com
|
|
235
|
+
playwright-cli click e4
|
|
236
|
+
playwright-cli fill e7 "test"
|
|
237
|
+
playwright-cli console
|
|
238
|
+
playwright-cli network
|
|
239
|
+
playwright-cli close
|
|
240
|
+
```
|
|
241
|
+
|
|
242
|
+
```bash
|
|
243
|
+
playwright-cli open https://example.com
|
|
244
|
+
playwright-cli tracing-start
|
|
245
|
+
playwright-cli click e4
|
|
246
|
+
playwright-cli fill e7 "test"
|
|
247
|
+
playwright-cli tracing-stop
|
|
248
|
+
playwright-cli close
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
## Specific tasks
|
|
252
|
+
|
|
253
|
+
* **Request mocking** [references/request-mocking.md](references/request-mocking.md)
|
|
254
|
+
* **Running Playwright code** [references/running-code.md](references/running-code.md)
|
|
255
|
+
* **Browser session management** [references/session-management.md](references/session-management.md)
|
|
256
|
+
* **Storage state (cookies, localStorage)** [references/storage-state.md](references/storage-state.md)
|
|
257
|
+
* **Test generation** [references/test-generation.md](references/test-generation.md)
|
|
258
|
+
* **Tracing** [references/tracing.md](references/tracing.md)
|
|
259
|
+
* **Video recording** [references/video-recording.md](references/video-recording.md)
|