opensteer
Opensteer Browser Automation
Opensteer provides persistent browser automation via a CLI and TypeScript SDK. It maintains browser sessions across calls and caches resolved element paths for deterministic replay.
CRITICAL: Always Use Opensteer Methods Over Playwright
Opensteer methods are optimized for scraping — they handle waiting, element resolution, and selector caching automatically. Never use raw Playwright when an Opensteer method exists.
| Wrong (raw Playwright) | Right (Opensteer) |
|---|---|
page.evaluate(() => [...document.querySelectorAll('.item')].map(...)) |
opensteer.extract({ description: "product listing" }) |
page.click('.submit') |
opensteer.click({ description: "the submit button" }) |
page.fill('#search', 'query') |
opensteer.input({ description: "search input", text: "q" }) |
Why: opensteer.extract() caches structural selectors that work across pages sharing the same template. Raw querySelectorAll is brittle, non-replayable, and bypasses the caching system. The only valid use of opensteer.page.evaluate() is calling fetch() for API-based extraction when a site has internal REST/GraphQL endpoints.
Default Workflow
Always use the CLI for exploration first. Only write scripts when the user asks.