pub struct RealBrowserOptions {Show 19 fields
pub engine: EngineType,
pub channel: String,
pub executable_path: Option<PathBuf>,
pub user_data_dir: Option<PathBuf>,
pub remote_debugging_port: u16,
pub headless: bool,
pub args: Vec<String>,
pub extra_args: Vec<String>,
pub ignore_default_args: Vec<String>,
pub ignore_all_default_args: bool,
pub startup_timeout: Duration,
pub slow_mo: u64,
pub timeout: Option<Duration>,
pub protocol_timeout: Option<Duration>,
pub seed_cookies: Vec<Value>,
pub verbose: bool,
pub node_executable: Option<PathBuf>,
pub node_working_dir: Option<PathBuf>,
pub downloads: DownloadSetting,
}Expand description
Options for launching an installed browser and attaching over CDP.
Fields§
§engine: EngineTypeBrowser Commander engine used after the browser starts.
channel: StringInstalled Chrome-family channel to discover.
executable_path: Option<PathBuf>Explicit installed-browser executable, bypassing channel discovery.
user_data_dir: Option<PathBuf>Dedicated, non-default browser profile.
remote_debugging_port: u16Loopback CDP port. Zero lets Chrome choose an available port.
headless: boolRun the installed browser headlessly.
args: Vec<String>Additional browser arguments.
extra_args: Vec<String>Additional browser arguments appended after the compatibility args.
ignore_default_args: Vec<String>Browser Commander default arguments to omit.
ignore_all_default_args: boolOmit every Browser Commander default argument.
startup_timeout: DurationMaximum time to wait for Chrome’s /json/version endpoint.
slow_mo: u64Delay Playwright/Puppeteer operations by this many milliseconds.
timeout: Option<Duration>Optional connection timeout.
protocol_timeout: Option<Duration>Optional Puppeteer timeout for individual CDP calls.
Cookies to seed immediately after attaching.
verbose: boolEnable browser and connector logging.
node_executable: Option<PathBuf>Node.js executable for Playwright/Puppeteer bridge engines.
node_working_dir: Option<PathBuf>Directory where Node resolves Playwright/Puppeteer.
downloads: DownloadSettingManage the installed browser’s downloads.
The same setting and the same manager as
LaunchOptions and
ConnectOptions, which is what makes a download started by hand in a
visible window land where an automated one does. See
downloads.
Implementations§
Source§impl RealBrowserOptions
impl RealBrowserOptions
Sourcepub fn chromiumoxide() -> Self
pub fn chromiumoxide() -> Self
Create native Chromiumoxide options.
Sourcepub fn playwright() -> Self
pub fn playwright() -> Self
Create Playwright bridge options.
Sourcepub fn executable_path(self, executable_path: impl Into<PathBuf>) -> Self
pub fn executable_path(self, executable_path: impl Into<PathBuf>) -> Self
Select an explicit installed-browser executable.
Sourcepub fn user_data_dir(self, user_data_dir: impl Into<PathBuf>) -> Self
pub fn user_data_dir(self, user_data_dir: impl Into<PathBuf>) -> Self
Select a dedicated browser profile.
Sourcepub fn remote_debugging_port(self, port: u16) -> Self
pub fn remote_debugging_port(self, port: u16) -> Self
Select a loopback CDP port. Zero asks Chrome to allocate one.
Sourcepub fn with_extra_args(self, args: Vec<String>) -> Self
pub fn with_extra_args(self, args: Vec<String>) -> Self
Add browser arguments after the compatibility args field.
Sourcepub fn ignore_default_args(self, args: Vec<String>) -> Self
pub fn ignore_default_args(self, args: Vec<String>) -> Self
Omit selected Browser Commander defaults.
Sourcepub fn ignore_all_default_args(self) -> Self
pub fn ignore_all_default_args(self) -> Self
Omit every Browser Commander default argument.
Sourcepub fn startup_timeout(self, timeout: Duration) -> Self
pub fn startup_timeout(self, timeout: Duration) -> Self
Set the CDP readiness timeout.
Sourcepub fn protocol_timeout(self, timeout: Duration) -> Self
pub fn protocol_timeout(self, timeout: Duration) -> Self
Set Puppeteer’s timeout for individual CDP calls.
Seed cookies after attaching.
Sourcepub fn node_executable(self, executable: impl Into<PathBuf>) -> Self
pub fn node_executable(self, executable: impl Into<PathBuf>) -> Self
Override the Node.js executable for bridge engines.
Sourcepub fn node_working_dir(self, directory: impl Into<PathBuf>) -> Self
pub fn node_working_dir(self, directory: impl Into<PathBuf>) -> Self
Set the directory where Node resolves Playwright/Puppeteer.
Sourcepub fn downloads(self, downloads: impl Into<DownloadSetting>) -> Self
pub fn downloads(self, downloads: impl Into<DownloadSetting>) -> Self
Manage the installed browser’s downloads.
§Arguments
downloads-truefor the defaults,falsefor none, orDownloadOptions
Sourcepub fn get_user_data_dir(&self) -> PathBuf
pub fn get_user_data_dir(&self) -> PathBuf
Resolve the configured or managed dedicated profile path.