Browser Automation
Headless browser. Open pages, click, type, scroll, read, screenshot, intercept requests, and stream live output — all server-side. No Playwright or Selenium configuration required.
| Verb | Description |
|---|---|
BROWSER OPEN "url" SET ?ok | Open URL in headless browser. Must be called first. |
BROWSER NAVIGATE "url" | Navigate to a new URL in the same session |
BROWSER CLICK "selector" | Click element by CSS selector |
BROWSER TYPE "selector" WITH "text" | Type into input by CSS selector |
BROWSER SCROLL "x,y" | Scroll page by x,y pixels. e.g. "0,500" scrolls down 500px |
BROWSER READ "selector" SET ?html | Get innerHTML of element |
BROWSER EVALUATE "js" SET ?result | Run JavaScript — returns value |
BROWSER WAIT n | Pause execution for n seconds |
BROWSER SCREENSHOT "/root/snap.png" SET ?path | Screenshot current page |
BROWSER COOKIES SET ?cookies | Get all cookies as array |
BROWSER BACK | Browser back |
BROWSER FORWARD | Browser forward |
BROWSER RELOAD | Reload current page |
BROWSER STREAM TO "channel" | Stream live screenshots to a WebSocket channel. [pending] |
BROWSER INTERCEPT "pattern" SET ?req | Intercept the next network request matching the URL pattern. [pending] |
BROWSER TAB NEXT | Dispatch Tab keydown on the focused element — moves focus to next focusable element |
BROWSER TAB PREV | Dispatch Shift+Tab keydown on the focused element — moves focus to previous focusable element |
BROWSER FOCUS CHECK [AS "id"|"name"|"class"] SET ?val | Returns the attribute value of the currently focused element. Default attribute: "id" |
BROWSER CLOSE | Close the browser session. Always call when done. |
Scrape a page
BROWSER OPEN "https://news.ycombinator.com" SET ?ok
AFTER BROWSER READ ".itemlist" SET ?html
AFTER BROWSER CLOSE
AFTER OCR ?html SET ?text
AFTER EMIT ?text
Try it ›
Fill a form and submit
BROWSER OPEN "https://example.com/login" SET ?ok
AFTER BROWSER TYPE "#email" WITH "user@example.com"
AFTER BROWSER TYPE "#password" WITH "secret"
AFTER BROWSER CLICK "#submit"
AFTER BROWSER WAIT 2
AFTER BROWSER READ ".welcome-msg" SET ?msg
AFTER BROWSER CLOSE
AFTER EMIT ?msg
Screenshot
BROWSER OPEN "https://ocalt.com" SET ?ok
AFTER BROWSER SCREENSHOT "/mounted/screenshots/snap.png" SET ?path
AFTER BROWSER CLOSE
AFTER SHARE ?path SET ?url
AFTER EMIT ?url
BROWSER STREAM — live screenshot feed [pending]
Pushes a live screenshot of the headless browser to a WebSocket channel at ~10fps. Useful for displaying live browser output to an end-user.
BROWSER OPEN "https://tradingview.com/chart/" SET ?ok
AFTER BROWSER STREAM TO "live-chart"
(* Subscribers on the "live-chart" channel receive base64-encoded PNG frames *)
BROWSER INTERCEPT — capture network request [pending]
BROWSER OPEN "https://example.com/app" SET ?ok
AFTER BROWSER INTERCEPT "*/api/data*" SET ?captured
AFTER EMIT ?captured(url)
AFTER EMIT ?captured(method)
AFTER EMIT ?captured(body)
AFTER BROWSER CLOSE
BROWSER SCROLL — scroll page
(* Scroll down 500px *)
BROWSER OPEN "https://example.com" SET ?ok
AFTER BROWSER SCROLL "0,500"
(* Scroll right and down *)
AFTER BROWSER SCROLL "200,300"
BROWSER WAIT — pause execution
BROWSER OPEN "https://example.com" SET ?ok
AFTER BROWSER CLICK "#load-more"
AFTER BROWSER WAIT 2
AFTER BROWSER READ ".results" SET ?html
AFTER BROWSER CLOSE
AFTER EMIT ?html
BROWSER FOCUS CHECK — focused element attribute
BROWSER OPEN "https://example.com/form" SET ?ok
AFTER BROWSER FOCUS CHECK AS "id" SET ?focused_id
AFTER EMIT ?focused_id
BROWSER TAB NEXT / PREV — tab through form fields
BROWSER OPEN "https://site1.com" SET ?ok
AFTER BROWSER EVALUATE "window.open('https://site2.com')" SET ?r
AFTER BROWSER TAB NEXT
AFTER BROWSER READ "title" SET ?title
AFTER BROWSER CLOSE
AFTER EMIT ?title
BROWSER EVALUATE — run JavaScript
BROWSER OPEN "https://example.com" SET ?ok
AFTER BROWSER EVALUATE "document.title" SET ?title
AFTER BROWSER EVALUATE "document.querySelectorAll('a').length" SET ?link_count
AFTER BROWSER CLOSE
AFTER EMIT ?title & " — " & ?link_count & " links"