API ReferenceJavaConfig
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.
Allwright.resolveConfig
MethodSince v0.0.27 – v0.0.30
Finds and merges the config file plus a named suite override into a ResolvedConfig.
public static ResolvedConfig resolveConfig()
public static ResolvedConfig resolveConfig(ResolveConfigOptions options)Example
ResolvedConfig cfg = Allwright.resolveConfig(new ResolveConfigOptions(null, null, "smoke"));Allwright.findConfigFile / loadConfigFile
MethodSince v0.0.27 – v0.0.30
Walks up from a directory looking for allwright.config.{yaml,yml,json}, then parses one into an AllwrightConfig.
public static Path findConfigFile()
public static AllwrightConfig loadConfigFile(Path configFile)Allwright.launchConfiguredBrowser
MethodSince v0.0.27 – v0.0.30
Launches whichever browser a ResolvedConfig names, applying its server address and launch options first.
public static Browser launchConfiguredBrowser(ResolvedConfig config)CommandOptions
TypeSince v0.0.14
Generic per-call timeout accepted by nearly every Page/Locator/AndroidApp method.
public record CommandOptions(Integer timeoutMs)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.
public record RetryConfig(Integer timeoutMs, Integer intervalMs)