// the find
jonhoo/fantoccini
A high-level API for programmatically interacting with web pages through WebDriver.
fantoccini is a Rust async library for browser automation via WebDriver. It wraps the WebDriver protocol with a type-safe, ergonomic API built on tokio. If you need to drive a browser from Rust — scraping, E2E testing, form submission — this is the only serious option in the ecosystem.
The API design is genuinely clean: chaining locator finds with actions reads naturally and the `Locator` enum (CSS, XPath, LinkText) covers most real-world needs. Full async from the ground up via tokio, not a blocking wrapper. Test coverage is real — it runs against actual chromedriver and geckodriver in CI, not mocks, which means the test suite actually catches WebDriver spec drift. Jon Gjengset maintaining it is a meaningful signal; the codebase is well-structured and the error types are informative rather than opaque.
No built-in browser management — you must already have geckodriver or chromedriver running before your code starts. For anything beyond one-off scripts this is annoying; you're wiring up your own process lifecycle. The API surface for JavaScript execution and waiting on async page mutations is thinner than Playwright equivalents — `wait.rs` exists but you'll hit its limits on modern SPAs. Documentation covers the basics but advanced patterns (iframes, shadow DOM, multi-tab coordination) are mostly left to reading the source. The ecosystem around this is sparse: no out-of-box screenshot diffing, no trace recording, no network interception — things Playwright users take for granted.