Add general flow runner and document natural-language usage
- Add flow.ts for go/click/type/press/wait/screenshot flows - Update web-automation docs with natural-language examples - Update SKILL.md quick reference for flow.ts - Remove temp script files
This commit is contained in:
@@ -40,4 +40,27 @@ npx tsx scrape.ts --url "https://example.com" --mode main --output page.md
|
||||
|
||||
# Authenticate flow
|
||||
npx tsx auth.ts --url "https://example.com/login"
|
||||
|
||||
# General natural-language browser flow
|
||||
npx tsx flow.ts --instruction 'go to https://search.fiorinis.com then type "pippo" then press enter then wait 2s'
|
||||
```
|
||||
|
||||
## Natural-language flow runner (`flow.ts`)
|
||||
|
||||
Use `flow.ts` when you want a general command style like:
|
||||
|
||||
- "go to this site"
|
||||
- "find this button and click it"
|
||||
- "type this and press enter"
|
||||
|
||||
### Example
|
||||
|
||||
```bash
|
||||
npx tsx flow.ts --instruction 'go to https://example.com then click on "Sign in" then type "stef@example.com" in #email then press enter'
|
||||
```
|
||||
|
||||
You can also use JSON steps for deterministic runs:
|
||||
|
||||
```bash
|
||||
npx tsx flow.ts --steps '[{"action":"goto","url":"https://example.com"},{"action":"click","text":"Sign in"}]'
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user