electron-playwright-cli 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
CHANGED
|
@@ -60,6 +60,16 @@ All standard commands from playwright-cli are available: `goto`, `snapshot`, `cl
|
|
|
60
60
|
|
|
61
61
|
electron-playwright-cli replaces the standard browser launch flow with a custom daemon that composes Playwright's internal `BrowserServerBackend` with an `ElectronContextFactory`. When you run a command, the CLI client spawns (or connects to) a background daemon process that launches your Electron app via `playwright._electron.launch()`, registers Electron-specific tools (like `electron_evaluate` and `electron_windows`) into Playwright's tool registry, and exposes the full Playwright CLI command surface over a Unix socket using newline-delimited JSON.
|
|
62
62
|
|
|
63
|
+
## Install as Agent Skill
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
npx skills add spacecake-labs/electron-playwright-cli
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
Works with Claude Code, Cursor, Codex, and [40+ other agents](https://skills.sh).
|
|
70
|
+
|
|
71
|
+
## try [spacecake](https://spacecake.ai) — the best interface for claude code
|
|
72
|
+
|
|
63
73
|
## Upstream
|
|
64
74
|
|
|
65
75
|
This project is a fork of [microsoft/playwright-cli](https://github.com/microsoft/playwright-cli), licensed under Apache-2.0.
|
package/package.json
CHANGED
|
@@ -33,6 +33,19 @@ class ElectronContextFactory {
|
|
|
33
33
|
await electronApp.firstWindow();
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
+
// wait for the page to finish loading before handing it off —
|
|
37
|
+
// without this, screenshots taken immediately can capture a blank page
|
|
38
|
+
const firstPage = browserContext.pages()[0];
|
|
39
|
+
if (firstPage) {
|
|
40
|
+
await firstPage
|
|
41
|
+
.waitForLoadState("domcontentloaded", { timeout: 10000 })
|
|
42
|
+
.catch(() => {});
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
electronApp.process().on("exit", () => {
|
|
46
|
+
setTimeout(() => process.exit(0), 1000);
|
|
47
|
+
});
|
|
48
|
+
|
|
36
49
|
return {
|
|
37
50
|
browserContext,
|
|
38
51
|
close: async () => {
|