ferridriver
High-performance browser automation library in Rust. Playwright-compatible API with three backends:
- CdpPipe -- Chrome DevTools Protocol over Unix pipes (fastest, default)
- CdpRaw -- Chrome DevTools Protocol over WebSocket (connect to running Chrome)
- WebKit -- Native WKWebView on macOS (native accessibility tree, native mouse events)
Usage
use ;
use LaunchOptions;
let browser = launch.await?;
let page = browser.page.await?;
page.goto.await?;
let title = page.title.await?;
page.locator.fill.await?;
page.locator.click.await?;
page.wait_for_load_state.await?;
browser.close.await?;
Features
- Playwright-compatible Page, Locator, Frame, BrowserContext APIs
- Network interception (route/unroute) with fulfill/continue/abort
- Dialog handling (configurable auto-accept or custom handler)
- Init script injection (runs before page scripts on every navigation)
- Expose Rust functions to page JavaScript
- Accessibility snapshots optimized for LLM consumption
- Cookie and localStorage state save/restore
- BDD step definitions (58 Gherkin steps for browser automation)
See the workspace README for full API reference.