allwright

Rust API reference

Every type and method allwright ships today, with a Since badge on every entry matching the changelog release it first shipped in.

cargo add allwright

Browser

5

Launch a Chromium or Firefox session and hold the handle every other call goes through. Nearly every method is async fn returning Result<T, Error> and needs .await; Page is a type alias for Tab (pub type Page = Tab).

View Browser

Page

14

Page is Tab under a type alias. Every action here also has a *_with_options twin (e.g. click_with_options) that accepts the same call plus a typed Options struct — shown once here, favoring the fuller signature. Tab::locator(...) and the get_by_* builders under Locator are also implemented directly on Tab.

View Page

Locator

6

Locator mirrors Page's action/query methods (click, fill, hover, press, focus, count, text_content, inner_text, wait_for), each delegating to self.page().<method>(self.selector()). What's below is what a Locator adds: building one semantically instead of by raw CSS, and narrowing it once built.

View Locator

Hooks

3

A hook coordinates a browser-native event that fires asynchronously outside any direct call — a new tab, a native file picker, a download. register_hook before the triggering action, then wait for it, so the event can't be missed between the two. HookType is a sealed trait — NEW_PAGE, FILE_CHOOSER, and DOWNLOAD are the only implementations.

View Hooks

Mobile

11

Android automation over adb — no Appium, no separate driver server. Reached through the allwright::mobile::android module; iOS has no runtime yet. Android methods take options directly, without a *_with_options split.

View Mobile

Config

5

allwright.config.yaml (or .json) drives browser choice, timeouts, and named profiles without writing it in code. Every client picks the file up the same way.

View Config