[][src]Struct chromiumoxide::browser::Browser

pub struct Browser { /* fields omitted */ }

A Browser is created when chromiumoxide connects to a Chromium instance.

Implementations

impl Browser[src]

pub async fn connect(debug_ws_url: impl Into<String>) -> Result<(Self, Handler)>[src]

Connect to an already running chromium instance via websocket

pub async fn launch(config: BrowserConfig) -> Result<(Self, Handler)>[src]

Launches a new instance of chromium in the background and attaches to its debug web socket.

This fails when no chromium executable could be detected.

This fails if no web socket url could be detected from the child processes stderr for more than 20 seconds.

pub fn websocket_address(&self) -> &String[src]

Returns the address of the websocket this browser is attached to

pub fn config(&self) -> Option<&BrowserConfig>[src]

The config of the spawned chromium instance if any.

pub async fn new_page<'_>(
    &'_ self,
    params: impl Into<CreateTargetParams>
) -> Result<Page>
[src]

Create a new browser page

pub async fn new_blank_tab<'_>(&'_ self) -> Result<Page>[src]

pub async fn execute<T: Command, '_>(
    &'_ self,
    cmd: T
) -> Result<CommandResponse<T::Response>>
[src]

Call a browser method.

pub async fn pages<'_>(&'_ self) -> Result<Vec<Page>>[src]

Return all of the pages of the browser

Trait Implementations

impl Debug for Browser[src]

impl Drop for Browser[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,