allwright

API ReferenceRustConfig

Config

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.

resolve_config

FunctionSince v0.0.27 – v0.0.30

Finds/loads the config (optionally scoped to a named suite), merges suite overrides over file defaults, and produces a fully-resolved ResolvedConfig.

pub fn resolve_config(options: ResolveConfigOptions) -> Result<ResolvedConfig>

find_config_file / load_config_file

FunctionSince v0.0.27 – v0.0.30

Walks up from a directory looking for a known config filename, then parses one (JSON or YAML by extension) into an AllwrightConfig.

pub fn find_config_file(start_dir: impl AsRef<Path>) -> Option<PathBuf>
pub fn load_config_file(config_file: impl AsRef<Path>) -> Result<AllwrightConfig>

launch_configured_browser

FunctionSince v0.0.27 – v0.0.30

Applies config.server_addr and launches the browser named in config.browser_name with config.launch_options.

pub async fn launch_configured_browser(config: &ResolvedConfig) -> Result<Browser>

CommandOptions

TypeSince v0.0.14

Generic per-call timeout shared by nearly every action across Page/Locator/Mobile. Implements Default.

pub struct CommandOptions {
    pub timeout_ms: Option<u32>,
}

RetryConfig

TypeSince v0.0.27 – v0.0.30

The retry/poll timing policy set in a config file's expect section and merged into ResolvedConfig.expect.

pub struct RetryConfig {
    pub timeout_ms: Option<u32>,
    pub interval_ms: Option<u32>,
}