TestBootstrap class
Manages global state for the browser test bootstrap process.
Internal class that maintains the global browser configuration and provides methods for overriding configurations in specific contexts.
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
-
browserTypes
↔ Map<
String, BrowserType> -
Globally accessible map of browser type implementations. Initialized by initialize.
getter/setter pair
- currentConfig ↔ BrowserConfig
-
The currently effective global browser configuration. This can be
temporarily changed by pushConfigOverride and restored by popConfigOverride.
Initialized by testBootstrap and accessible by test helpers.
getter/setter pair
- driverManager ↔ DriverManager
-
Globally accessible DriverManager instance. Initialized by initialize.
Note: Methods on DriverManager are static, so this instance might not be strictly needed
for calling methods like
ensureDriver, but good to have if non-static methods are added.getter/setter pair - registry ↔ Registry
-
Globally accessible Registry instance. Initialized by initialize.
getter/setter pair
Static Methods
-
ensureBrowserInstalled(
String? browserName, {bool force = false}) → Future< bool> - Ensures that the specified browser is downloaded and installed.
-
getBinaryOverride(
String browserName) → String? -
Returns the configured binary override for
browserName, if any. -
initialize(
BrowserConfig config) → Future< void> -
Initializes the global TestBootstrap state with the provided
config. -
popConfigOverride(
) → void - Restores the previous configuration from the stack.
-
pushConfigOverride(
{String? browserName, bool? headless, String? baseUrl, ProxyConfiguration? proxy, Duration? timeout}) → BrowserConfig - Temporarily overrides the current configuration for a specific context.
-
resolveExecutablePath(
String browserName) → Future< String> -
Resolves the executable path for
browserName, honoring overrides when set.