playwright-repl 0.1.0 → 0.1.1
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/README.md +4 -5
- package/RELEASES.md +85 -70
- package/package.json +1 -1
- package/src/repl.mjs +604 -582
package/README.md
CHANGED
|
@@ -46,13 +46,12 @@ $ playwright-repl --replay smoke-test.pw
|
|
|
46
46
|
## Install
|
|
47
47
|
|
|
48
48
|
```bash
|
|
49
|
-
# Prerequisites: Node.js >= 18 and Playwright
|
|
50
|
-
npm install -g playwright@latest
|
|
51
|
-
|
|
52
|
-
# Install playwright-repl
|
|
53
49
|
npm install -g playwright-repl
|
|
54
50
|
|
|
55
|
-
#
|
|
51
|
+
# If you don't have browser binaries yet
|
|
52
|
+
npx playwright install
|
|
53
|
+
|
|
54
|
+
# Or install from source
|
|
56
55
|
git clone https://github.com/stevez/playwright-repl.git
|
|
57
56
|
cd playwright-repl && npm install && npm link
|
|
58
57
|
```
|
package/RELEASES.md
CHANGED
|
@@ -1,70 +1,85 @@
|
|
|
1
|
-
# Releases
|
|
2
|
-
|
|
3
|
-
## v0.1.
|
|
4
|
-
|
|
5
|
-
**2026-02-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
-
|
|
21
|
-
|
|
22
|
-
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
-
|
|
28
|
-
- `
|
|
29
|
-
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
-
|
|
36
|
-
-
|
|
37
|
-
-
|
|
38
|
-
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
-
|
|
48
|
-
-
|
|
49
|
-
-
|
|
50
|
-
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
-
|
|
54
|
-
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
-
|
|
60
|
-
-
|
|
61
|
-
-
|
|
62
|
-
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
-
|
|
68
|
-
-
|
|
69
|
-
-
|
|
70
|
-
|
|
1
|
+
# Releases
|
|
2
|
+
|
|
3
|
+
## v0.1.1 — Bug Fixes
|
|
4
|
+
|
|
5
|
+
**2026-02-12**
|
|
6
|
+
|
|
7
|
+
### Fixes
|
|
8
|
+
|
|
9
|
+
- **`kill-all` on Windows 11**: Replace deprecated `wmic` with PowerShell `Get-CimInstance` — fixes `'wmic' is not recognized` error on modern Windows
|
|
10
|
+
- **Text locator case sensitivity**: `click`, `dblclick`, and `hover` now use a fallback chain (exact text → button role → link role → substring match) so `click "GET STARTED"` works even when the DOM text is "Get Started"
|
|
11
|
+
|
|
12
|
+
### Tests
|
|
13
|
+
|
|
14
|
+
- Updated tests for new text locator fallback chain and PowerShell kill-all
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## v0.1.0 — Initial Release
|
|
19
|
+
|
|
20
|
+
**2026-02-09**
|
|
21
|
+
|
|
22
|
+
First public release of playwright-repl — an interactive REPL for Playwright browser automation.
|
|
23
|
+
|
|
24
|
+
### Features
|
|
25
|
+
|
|
26
|
+
**Interactive REPL**
|
|
27
|
+
- Persistent socket connection to the Playwright daemon (zero overhead per command)
|
|
28
|
+
- 50+ browser commands with short aliases (`c` for click, `s` for snapshot, etc.)
|
|
29
|
+
- Tab completion for commands, aliases, and meta-commands
|
|
30
|
+
- Command history (persisted across sessions)
|
|
31
|
+
- Automatic daemon startup and connection management
|
|
32
|
+
- Auto-reconnect on daemon disconnect
|
|
33
|
+
|
|
34
|
+
**Session Recording & Replay**
|
|
35
|
+
- Record browser interactions to `.pw` files (plain text, one command per line)
|
|
36
|
+
- Replay recorded sessions at full speed or step-by-step
|
|
37
|
+
- Pause/resume recording mid-session
|
|
38
|
+
- Start recording from CLI (`--record`) or inside the REPL (`.record`)
|
|
39
|
+
|
|
40
|
+
**Assertions**
|
|
41
|
+
- `verify-text` — assert text is visible on the page
|
|
42
|
+
- `verify-element` — assert element exists by role and accessible name
|
|
43
|
+
- `verify-value` — assert input/select/checkbox value
|
|
44
|
+
- `verify-list` — assert list contains expected items
|
|
45
|
+
|
|
46
|
+
**Browser Commands**
|
|
47
|
+
- Navigation: `goto`, `go-back`, `go-forward`, `reload`
|
|
48
|
+
- Interaction: `click`, `dblclick`, `fill`, `type`, `press`, `hover`, `select`, `check`, `uncheck`, `upload`, `drag`
|
|
49
|
+
- Inspection: `snapshot`, `screenshot`, `eval`, `console`, `network`, `run-code`
|
|
50
|
+
- Tabs: `tab-list`, `tab-new`, `tab-close`, `tab-select`
|
|
51
|
+
- Storage: cookies, localStorage, sessionStorage (list/get/set/delete/clear)
|
|
52
|
+
- Auth state: `state-save`, `state-load`
|
|
53
|
+
- Network: `route`, `route-list`, `unroute`
|
|
54
|
+
- Dialogs: `dialog-accept`, `dialog-dismiss`
|
|
55
|
+
- Layout: `resize`, `pdf`
|
|
56
|
+
- Sessions: `list`, `close`, `close-all`, `kill-all`
|
|
57
|
+
|
|
58
|
+
**CLI Options**
|
|
59
|
+
- `--headed` — visible browser mode
|
|
60
|
+
- `--browser` — choose chrome, firefox, webkit, or msedge
|
|
61
|
+
- `--session` — named sessions for parallel workflows
|
|
62
|
+
- `--persistent` / `--profile` — persistent browser profiles
|
|
63
|
+
- `--replay` / `--step` — session replay from CLI
|
|
64
|
+
- `--record` — start with recording enabled
|
|
65
|
+
- `--silent` — quiet mode for scripting
|
|
66
|
+
|
|
67
|
+
**Cross-Platform**
|
|
68
|
+
- Linux, macOS, Windows
|
|
69
|
+
- Unix sockets (Linux/macOS) and named pipes (Windows)
|
|
70
|
+
|
|
71
|
+
### Technical Details
|
|
72
|
+
|
|
73
|
+
- Pure ESM JavaScript (no build step, no TypeScript)
|
|
74
|
+
- Connects to Playwright's MCP terminal daemon over Unix socket / named pipe
|
|
75
|
+
- Wire-compatible with `playwright-cli` — produces identical JSON messages
|
|
76
|
+
- Requires `playwright >= 1.59.0-alpha` (daemon code in `lib/mcp/terminal/`)
|
|
77
|
+
- 218 tests, 96% statement coverage
|
|
78
|
+
|
|
79
|
+
### Known Limitations
|
|
80
|
+
|
|
81
|
+
- Low-level keyboard commands (`keydown`, `keyup`) not yet mapped
|
|
82
|
+
- Low-level mouse commands (`mousemove`, `mousedown`, `mouseup`, `mousewheel`) not yet mapped
|
|
83
|
+
- Tracing (`tracing-start`, `tracing-stop`) not yet mapped
|
|
84
|
+
- Video recording (`video-start`, `video-stop`) not yet mapped
|
|
85
|
+
- Element refs (e.g., `e5`) are ephemeral — they change between snapshots
|