[][src]Struct thirtyfour::sync::GenericWebDriver

pub struct GenericWebDriver<T: RemoteConnectionSync + RemoteConnectionSyncCreate> {
    pub session_id: SessionId,
    // some fields omitted
}

This GenericWebDriver struct encapsulates a synchronous Selenium WebDriver browser session. For the async driver, see GenericWebDriver.

See the WebDriverCommands trait for WebDriver methods.

Example:

use thirtyfour::sync::prelude::*;

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

Fields

session_id: SessionId

Implementations

impl<T: 'static> GenericWebDriver<T> where
    T: RemoteConnectionSync + RemoteConnectionSyncCreate
[src]

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

Create a new synchronous WebDriver struct.

Example

let caps = DesiredCapabilities::chrome();
let driver = WebDriver::new("http://localhost:4444/wd/hub", &caps)
    .expect("Error starting browser");

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

Return a clone of the capabilities as returned by Selenium.

pub fn quit(self) -> WebDriverResult<()>[src]

End the webdriver session.

Trait Implementations

impl<T: Debug + RemoteConnectionSync + RemoteConnectionSyncCreate> Debug for GenericWebDriver<T>[src]

impl<T> Drop for GenericWebDriver<T> where
    T: RemoteConnectionSync + RemoteConnectionSyncCreate
[src]

fn drop(&mut self)[src]

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

impl<T> WebDriverCommands for GenericWebDriver<T> where
    T: RemoteConnectionSync + RemoteConnectionSyncCreate
[src]

Auto Trait Implementations

impl<T> !RefUnwindSafe for GenericWebDriver<T>

impl<T> Send for GenericWebDriver<T>

impl<T> Sync for GenericWebDriver<T>

impl<T> Unpin for GenericWebDriver<T> where
    T: Unpin

impl<T> !UnwindSafe for GenericWebDriver<T>

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.