pub fn new<C>(remote_server_addr: &str, capabilities: C) -> WebDriverResult<Self>
    where
        C: Serialize,
    {
        let conn = Arc::new(T::create(remote_server_addr)?);
        let (session_id, session_capabilities) = start_session(conn.clone(), capabilities)?;
        let driver = GenericWebDriver {
            session_id,
            conn,
            capabilities: session_capabilities,
            quit_on_drop: true,
            phantom: PhantomData,
        };

        Ok(driver)
    }
/// Create a new synchronous WebDriver struct.
///
/// # Example
/// ```rust
/// # use thirtyfour::sync::prelude::*;
/// #
/// let caps = DesiredCapabilities::chrome();
/// let driver = WebDriver::new("http://localhost:4444/wd/hub", &caps)
///     .expect("Error starting browser");
/// ```
Create a new synchronous WebDriver struct.
Create a new synchronous WebDriver struct .
pub fn new<C>(remote_server_addr: &str, capabilities: C) -> WebDriverResult<Self>
    where
        C: Serialize,
    {
        let conn = Arc::new(T::create(remote_server_addr)?);
        let (session_id, session_capabilities) = start_session(conn.clone(), capabilities)?;
        let driver = GenericWebDriver {
            session_id,
            conn,
            capabilities: session_capabilities,
            quit_on_drop: true,
            phantom: PhantomData,
        };
        Ok(driver)
    }
pub fn new < C > ( remote_server_addr : & str , capabilities : C ) -> WebDriverResult < Self > where C : Serialize , { let conn = Arc :: new ( T :: create ( remote_server_addr ) ? ) ; let ( session_id , session_capabilities ) = start_session ( conn . clone ( ) , capabilities ) ? ; let driver = GenericWebDriver { session_id , conn , capabilities : session_capabilities , quit_on_drop : true , phantom : PhantomData , } ; Ok ( driver ) }
Create a new synchronous WebDriver struct.
Create a new synchronous WebDriver struct .
remote_server_addr
&str
capabilities
C
example
None
use thirtyfour::sync::prelude::*;
None