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
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
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
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
Generic per-call timeout shared by nearly every action across Page/Locator/Mobile. Implements Default.
pub struct CommandOptions {
pub timeout_ms: Option<u32>,
}RetryConfig
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>,
}