#[non_exhaustive]pub struct ConnectOverCdpOptions {
pub headers: Option<HashMap<String, String>>,
pub slow_mo: Option<f64>,
pub timeout: Option<f64>,
pub no_defaults: Option<bool>,
pub artifacts_dir: Option<String>,
}Expand description
Options for BrowserType::connect_over_cdp.
Only supported for Chromium. Allows connecting to a Chrome DevTools Protocol endpoint,
such as those provided by browserless, Chrome with --remote-debugging-port, or other
CDP-compatible services.
See: https://playwright.dev/docs/api/class-browsertype#browser-type-connect-over-cdp
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.headers: Option<HashMap<String, String>>Additional HTTP headers to be sent with the connection request.
slow_mo: Option<f64>Slows down Playwright operations by the specified amount of milliseconds.
timeout: Option<f64>Maximum time in milliseconds to wait for the connection to be established. Defaults to 30000 (30 seconds). Pass 0 to disable timeout.
no_defaults: Option<bool>Disables Playwright’s default overrides (download behavior, focus/media emulation) when attaching to an already-running browser — for “attach without disturbing state” workflows.
artifacts_dir: Option<String>Directory where traces and downloads captured over this CDP connection are stored.
Implementations§
Source§impl ConnectOverCdpOptions
impl ConnectOverCdpOptions
Sourcepub fn no_defaults(self, no_defaults: bool) -> Self
pub fn no_defaults(self, no_defaults: bool) -> Self
Disable Playwright’s default overrides when attaching to a running browser.
Sourcepub fn artifacts_dir(self, artifacts_dir: impl Into<String>) -> Self
pub fn artifacts_dir(self, artifacts_dir: impl Into<String>) -> Self
Set the directory for traces and downloads captured over this CDP connection.
Trait Implementations§
Source§impl Clone for ConnectOverCdpOptions
impl Clone for ConnectOverCdpOptions
Source§fn clone(&self) -> ConnectOverCdpOptions
fn clone(&self) -> ConnectOverCdpOptions
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more