[][src]Struct thirtyfour::WebDriver

pub struct WebDriver {
    pub session_id: SessionId,
    // some fields omitted
}

The WebDriver struct encapsulates an async Selenium WebDriver browser session. For the sync driver, see sync::WebDriver.

See the WebDriverCommands trait for WebDriver methods.

Example:

use thirtyfour::prelude::*;
use tokio;

#[tokio::main]
async fn main() -> WebDriverResult<()> {
    let caps = DesiredCapabilities::chrome();
    let driver = WebDriver::new("http://localhost:4444/wd/hub", &caps).await?;
    driver.get("http://webappdemo").await?;
    Ok(())
}

Fields

session_id: SessionId

Methods

impl WebDriver[src]

pub async fn new<'_, T>(
    remote_server_addr: &'_ str,
    capabilities: T
) -> WebDriverResult<Self> where
    T: Serialize
[src]

Create a new async WebDriver struct.

Example

let caps = DesiredCapabilities::chrome();
let driver = WebDriver::new("http://localhost:4444/wd/hub", &caps).await?;

pub fn capabilities(&self) -> DesiredCapabilities[src]

Return a clone of the capabilities as returned by Selenium.

Trait Implementations

impl Debug for WebDriver[src]

impl Drop for WebDriver[src]

fn drop(&mut self)[src]

Close the current session when the WebDriver struct goes out of scope.

impl WebDriverCommands for WebDriver[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, 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.