open-browser-setup 1.0.0 → 1.0.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/package.json
CHANGED
|
@@ -20,7 +20,7 @@ argument-hint: "describe what you want to do in the browser"
|
|
|
20
20
|
|
|
21
21
|
# Open Browser
|
|
22
22
|
|
|
23
|
-
Control the user's real Chrome browser via the `open-browser` CLI.
|
|
23
|
+
Control the user's real Chrome browser via the `open-browser` CLI. A background daemon keeps the Chrome extension connected between commands.
|
|
24
24
|
|
|
25
25
|
## Prerequisites
|
|
26
26
|
|
|
@@ -33,14 +33,26 @@ Control the user's real Chrome browser via the `open-browser` CLI. Every command
|
|
|
33
33
|
Every browser session follows this pattern:
|
|
34
34
|
|
|
35
35
|
```
|
|
36
|
-
1. open-browser
|
|
36
|
+
1. open-browser start ← starts daemon, connects extension, creates session + tab group
|
|
37
37
|
2. open-browser navigate <url> ← go to a page
|
|
38
38
|
3. open-browser snapshot --json ← see interactive elements with @eN refs
|
|
39
39
|
4. open-browser click @e5 ← interact using refs from snapshot
|
|
40
40
|
5. open-browser verify text "…" ← confirm the result
|
|
41
41
|
```
|
|
42
42
|
|
|
43
|
-
|
|
43
|
+
`open-browser start` handles everything — daemon, extension connection, session creation, and opens `localhost:9876` in the tab group. All subsequent commands are instant. If the daemon is already running, `start` is a no-op.
|
|
44
|
+
|
|
45
|
+
The daemon also auto-starts when you run any command directly (e.g. `open-browser navigate`), but using `start` first is more reliable.
|
|
46
|
+
|
|
47
|
+
Always use `snapshot --json` to discover elements before interacting. The `@eN` refs (like `@e1`, `@e5`, `@e12`) are how you target elements for click, type, select, and other interactions.
|
|
48
|
+
|
|
49
|
+
## Daemon Commands
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
open-browser start # Start daemon + session + tab group (all-in-one)
|
|
53
|
+
open-browser stop # Stop the daemon
|
|
54
|
+
open-browser status # Check if daemon is running
|
|
55
|
+
```
|
|
44
56
|
|
|
45
57
|
## Using --json
|
|
46
58
|
|