pub struct CdpBrowserDriver { /* private fields */ }Expand description
A real CDP browser driver that communicates with Chrome/Chromium.
This is the heavyweight champion — it launches Chrome, manages tabs
through the /json/* HTTP endpoints, and executes CDP commands to
drive browser automation.
Implementations§
Source§impl CdpBrowserDriver
impl CdpBrowserDriver
Sourcepub fn with_defaults() -> Self
pub fn with_defaults() -> Self
Create a driver with default configuration.
Sourcepub async fn shutdown(&self) -> PunchResult<()>
pub async fn shutdown(&self) -> PunchResult<()>
Shut down — kill all sessions and the Chrome process.
Trait Implementations§
Source§impl BrowserDriver for CdpBrowserDriver
impl BrowserDriver for CdpBrowserDriver
Source§fn launch<'life0, 'life1, 'async_trait>(
&'life0 self,
config: &'life1 BrowserConfig,
) -> Pin<Box<dyn Future<Output = PunchResult<BrowserSession>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn launch<'life0, 'life1, 'async_trait>(
&'life0 self,
config: &'life1 BrowserConfig,
) -> Pin<Box<dyn Future<Output = PunchResult<BrowserSession>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Launch a browser instance and return a connected session.
Source§fn execute<'life0, 'life1, 'async_trait>(
&'life0 self,
session: &'life1 mut BrowserSession,
action: BrowserAction,
) -> Pin<Box<dyn Future<Output = PunchResult<BrowserResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn execute<'life0, 'life1, 'async_trait>(
&'life0 self,
session: &'life1 mut BrowserSession,
action: BrowserAction,
) -> Pin<Box<dyn Future<Output = PunchResult<BrowserResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Execute a browser action within the given session.
Source§fn close<'life0, 'life1, 'async_trait>(
&'life0 self,
session: &'life1 mut BrowserSession,
) -> Pin<Box<dyn Future<Output = PunchResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn close<'life0, 'life1, 'async_trait>(
&'life0 self,
session: &'life1 mut BrowserSession,
) -> Pin<Box<dyn Future<Output = PunchResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Close the browser session and clean up resources.
Auto Trait Implementations§
impl !Freeze for CdpBrowserDriver
impl !RefUnwindSafe for CdpBrowserDriver
impl Send for CdpBrowserDriver
impl Sync for CdpBrowserDriver
impl Unpin for CdpBrowserDriver
impl UnsafeUnpin for CdpBrowserDriver
impl !UnwindSafe for CdpBrowserDriver
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more