Expand description
Browser management for browser automation.
This module provides utilities for:
- Launching browser instances
- Navigation operations
Re-exports§
pub use browser_process::BrowserProcess;pub use cdp_endpoint::fetch_cdp_version;pub use cdp_endpoint::read_dev_tools_active_port;pub use cdp_endpoint::wait_for_cdp_endpoint;pub use cdp_endpoint::CdpEndpointRequest;pub use chromiumoxide_adapter::ChromiumoxidePage;pub use connector::connect_browser;pub use connector::ConnectOptions;pub use debugging_port::assert_fixed_debugging_port;pub use debugging_port::reserve_loopback_port;pub use debugging_port::PortRaceError;pub use launcher::launch_browser;pub use launcher::Browser;pub use launcher::LaunchMode;pub use launcher::LaunchOptions;pub use launcher::LaunchResult;pub use launcher::LAUNCH_MODES;pub use media::emulate_media;pub use media::ColorScheme;pub use media::EmulateMediaOptions;pub use navigation_ops::goto;pub use navigation_ops::wait_for_url_stabilization;pub use navigation_ops::WaitUntil;pub use node_bridge::NodeBridgePage;pub use open_in_user_browser::build_open_command;pub use open_in_user_browser::open_in_user_browser;pub use open_in_user_browser::validate_open_url;pub use open_in_user_browser::OpenInUserBrowserResult;pub use playwright_driver_page::PlaywrightConnect;pub use playwright_driver_page::PlaywrightDriverPage;pub use playwright_driver_page::PlaywrightLaunch;pub use profile_directory::create_temporary_user_data_dir;pub use profile_directory::prepare_user_data_dir;pub use profile_directory::remove_user_data_dir;pub use raw_cdp::RawCdpCommand;pub use real_browser::build_real_browser_args;pub use real_browser::launch_and_connect_real_browser;pub use real_browser::launch_real_browser;pub use real_browser::resolve_system_browser_executable;pub use real_browser::RealBrowserLaunchResult;pub use real_browser::RealBrowserOptions;pub use real_browser::DEFAULT_CLOSE_TIMEOUT;pub use real_browser::DEFAULT_PORT_ATTEMPTS;pub use restrictions::launch_restriction_preset;pub use restrictions::launch_restriction_presets;pub use restrictions::launch_restrictions;pub use restrictions::merge_feature_switches;pub use restrictions::resolve_restrictions;pub use restrictions::LaunchRestriction;pub use restrictions::ResolvedRestrictions;pub use restrictions::LAUNCH_RESTRICTIONS_SOURCE;pub use snapshot::launch_snapshot;pub use snapshot::snapshot_user_data_dir;pub use snapshot::SnapshotLaunchResult;pub use snapshot::SnapshotOptions;pub use snapshot::SnapshotReport;pub use storage_state::save_storage_state;pub use storage_state::StorageEntry;pub use storage_state::StorageOrigin;pub use storage_state::StorageState;pub use storage_state::StorageStateInput;pub use system_browser::assert_dedicated_user_data_dir;pub use system_browser::default_real_browser_user_data_dir;pub use system_browser::known_default_user_data_dirs;pub use system_browser::resolve_browser_executable;
Modules§
- browser_
process - The spawned browser process handle shared by the real-browser launcher and
LaunchResult. - cdp_
endpoint - Waiting for a spawned browser’s DevTools endpoint and proving it is ours (issue #101).
- chromiumoxide_
adapter - Chromiumoxide-backed
EngineAdapterimplementation. - connector
- Connect to an already-running Chromium-family browser over CDP.
- debugging_
port - Fixed remote debugging ports for the real browser (issue #101).
- extension_
relay - Native typed relay for the shared Chrome companion extension, without Node.
- launcher
- Browser launcher for browser automation.
- media
- Media emulation for browser automation.
- migration
- Profile migration, mirroring
js/src/browser/migration/index.js. - navigation_
ops - Navigation operations for browser automation.
- node_
bridge - Node.js CLI bridge for Playwright and Puppeteer engines.
- open_
in_ user_ browser - Open a URL with the operating system’s default browser, without automation.
- parity
- Measure driven browsers against the same binary started by hand.
- playwright_
driver_ page - Native Playwright engine: typed calls to the official driver.
- profile_
directory - Fresh user data directories for every launch (issues #101 and #103).
- raw_cdp
- Sending a CDP command chromiumoxide has no generated type for.
- real_
browser - Launch genuine installed Chrome-family browsers and attach over CDP.
- restrictions
- Named, opt-in launch restrictions (issue #103).
- snapshot
- Read-only copies of live Chromium profiles and native snapshot launches.
- storage_
state - Playwright-compatible cookie and origin-scoped localStorage state.
- system_
browser - Discovery of installed Chrome-family browsers and their default profiles.
- webdriver
- Managed ChromeDriver/geckodriver through command-stream, with typed Fantoccini sessions, portable managed downloads and optional native WebDriver BiDi.
Structs§
- Browser
Cookie - A browser cookie in the shape accepted by Playwright/Puppeteer contexts.
- Browser
Cookie Read Options - Options for
read_browser_cookies. - Browser
Profile - Metadata for a cookie-bearing installed browser profile.
- Browser
Profile Options - Options for
list_browser_profiles. - Browser
Source - One browser in the shared catalogue.
- Cookie
Source Listing - One installed browser profile that holds cookies, with per-domain counts
when a domain filter is supplied. Cookie values are never read, so this is
the data behind the
cookies sourcescommand. - Import
Source - The browser an import reads from, as chosen by
resolve_import_source. - Safe
Storage Identity - The Chromium Safe Storage identity for a browser.
Statics§
- SUPPORTED_
COOKIE_ BROWSERS - Browsers whose on-disk cookie stores can be imported, driven by the shared
catalogue. Re-exported here so the name callers already use keeps working.
Browsers whose on-disk cookie stores can be imported, driven by the shared
catalogue. Re-exported here so the name callers already use keeps working.
Browsers whose on-disk cookie stores can be imported, driven by the shared
catalogue. Re-exported here so the name callers already use keeps working.
Browsers whose on-disk cookie stores can be imported, in catalogue order.
Mirrors
SUPPORTED_COOKIE_BROWSERS/BROWSER_IDSin the JavaScript library.
Functions§
- browser_
family - The family (
chromiumorfirefox) of a browser name. - browser_
for_ identifier - Match a raw OS identifier (bundle id,
.desktopname or ProgId) to a canonical browser id. Comparison is case-insensitive because the registry and the operating systems disagree on casing. - browser_
ids - Canonical browser ids, in catalogue order.
- browser_
sources - Every known browser, in catalogue order.
- clear_
browser_ cookie_ memory_ cache - Clear only the current process’s derived-key cache.
- default_
browser_ identifiers - The operating-system identifiers that mark a browser as the system default:
macOS bundle ids, Linux
.desktopfile names, or Windows ProgIds. - default_
run_ command - The default
RunCommand, backed by a real (shell-free) subprocess. - find_
browser_ source - Resolve a name (canonical id or alias) to its catalogue entry.
- is_
default_ browser_ keyword - Whether
browserasks for the system default rather than a named browser. - is_
single_ profile_ browser - True when a browser stores one profile in the root itself (Opera-style).
- list_
browser_ profiles - Discover cookie-bearing profiles from installed browsers. When
browseris unset, every browser in the shared catalogue is scanned. - list_
cookie_ sources - List the installed browser profiles that hold cookies, with per-domain
counts when
domainsis given. Values are never read or returned — this is the data behind thecookies sourcescommand. - normalize_
browser_ id - Resolve a name to its canonical id, erroring with the catalogue listed.
- parse_
mac_ launch_ services_ handler - Read the
httpshandler bundle id out ofdefaults read ... LSHandlersoutput. The output is NeXTSTEP-style plist text; each handler is a brace block that may carry anLSHandlerURLSchemeand anLSHandlerRoleAll. - parse_
windows_ prog_ id - Read the ProgId out of
reg query ... /v ProgIdoutput:regprintsProgId REG_SZ FirefoxHTML, so take the last whitespace token of the ProgId line. - read_
browser_ cookies - Read cookies from an installed Chrome, Edge, Brave, Chromium, or Firefox profile.
- resolve_
browser_ roots - The absolute profile roots a browser uses on a platform. Returns an empty vector when the browser does not run on that platform (for example Chrome Canary on Linux). Windows roots are built with backslashes regardless of the host, so the catalogue resolves identically on any platform.
- resolve_
default_ browser - Resolve the system default browser to a canonical catalogue id, or
Nonewhen it cannot be determined. On macOS a failure of the lookup tool propagates as an error (there is no fallback); on Linux and Windows a missing tool resolves toNone. - resolve_
import_ source - Pick the source browser for an import.
- resolve_
source_ browser - Resolve a requested browser to a canonical catalogue id, expanding the
default/autokeywords to the operating-system default browser. Named browsers are normalized through the catalogue as before. - safe_
storage_ identity - The Chromium Safe Storage identity for a browser, or
Nonefor a Firefox-family browser (which does not use OSCrypt).
Type Aliases§
- Environment
- Extra environment variables, used when expanding profile-root templates.
- RunCommand
- A command runner:
(command, args, environment) -> stdout. A spawn failure (for example a missing binary) is anErr; any exit code, even non-zero, is anOkwith the captured stdout. Injected so the resolver is deterministic in tests.