[−][src]Struct chromiumoxide::browser::Browser
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]
&'_ self,
params: impl Into<CreateTargetParams>
) -> Result<Page>
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]
&'_ self,
cmd: T
) -> Result<CommandResponse<T::Response>>
Call a browser method.
pub async fn pages<'_>(&'_ self) -> Result<Vec<Page>>
[src]
Return all of the pages of the browser
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Browser
[src]
impl Send for Browser
[src]
impl Sync for Browser
[src]
impl Unpin for Browser
[src]
impl !UnwindSafe for Browser
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,