[−][src]Struct thirtyfour::sync::GenericWebDriver
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
Methods
impl<T: 'static> GenericWebDriver<T> where
T: RemoteConnectionSync + RemoteConnectionSyncCreate,
[src]
T: RemoteConnectionSync + RemoteConnectionSyncCreate,
pub fn new<C>(
remote_server_addr: &str,
capabilities: C
) -> WebDriverResult<Self> where
C: Serialize,
[src]
remote_server_addr: &str,
capabilities: C
) -> WebDriverResult<Self> where
C: Serialize,
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]
T: RemoteConnectionSync + RemoteConnectionSyncCreate,
impl<T> WebDriverCommands for GenericWebDriver<T> where
T: RemoteConnectionSync + RemoteConnectionSyncCreate,
[src]
T: RemoteConnectionSync + RemoteConnectionSyncCreate,
fn cmd(&self, command: Command) -> WebDriverResult<Value>
[src]
fn session(&self) -> WebDriverSession
[src]
fn close(&self) -> WebDriverResult<()>
[src]
fn get<S: Into<String>>(&self, url: S) -> WebDriverResult<()>
[src]
fn current_url(&self) -> WebDriverResult<String>
[src]
fn page_source(&self) -> WebDriverResult<String>
[src]
fn title(&self) -> WebDriverResult<String>
[src]
fn find_element(&self, by: By) -> WebDriverResult<WebElement>
[src]
fn find_elements(&self, by: By) -> WebDriverResult<Vec<WebElement>>
[src]
fn execute_script(&self, script: &str) -> WebDriverResult<ScriptRetSync>
[src]
fn execute_script_with_args(
&self,
script: &str,
args: &ScriptArgs
) -> WebDriverResult<ScriptRetSync>
[src]
&self,
script: &str,
args: &ScriptArgs
) -> WebDriverResult<ScriptRetSync>
fn execute_async_script(&self, script: &str) -> WebDriverResult<ScriptRetSync>
[src]
fn execute_async_script_with_args(
&self,
script: &str,
args: &ScriptArgs
) -> WebDriverResult<ScriptRetSync>
[src]
&self,
script: &str,
args: &ScriptArgs
) -> WebDriverResult<ScriptRetSync>
fn current_window_handle(&self) -> WebDriverResult<WindowHandle>
[src]
fn window_handles(&self) -> WebDriverResult<Vec<WindowHandle>>
[src]
fn maximize_window(&self) -> WebDriverResult<()>
[src]
fn minimize_window(&self) -> WebDriverResult<()>
[src]
fn fullscreen_window(&self) -> WebDriverResult<()>
[src]
fn get_window_rect(&self) -> WebDriverResult<Rect>
[src]
fn set_window_rect(&self, rect: OptionRect) -> WebDriverResult<()>
[src]
fn back(&self) -> WebDriverResult<()>
[src]
fn forward(&self) -> WebDriverResult<()>
[src]
fn refresh(&self) -> WebDriverResult<()>
[src]
fn get_timeouts(&self) -> WebDriverResult<TimeoutConfiguration>
[src]
fn set_timeouts(&self, timeouts: TimeoutConfiguration) -> WebDriverResult<()>
[src]
fn implicitly_wait(&self, time_to_wait: Duration) -> WebDriverResult<()>
[src]
fn set_script_timeout(&self, time_to_wait: Duration) -> WebDriverResult<()>
[src]
fn set_page_load_timeout(&self, time_to_wait: Duration) -> WebDriverResult<()>
[src]
fn action_chain(&self) -> ActionChain
[src]
fn get_cookies(&self) -> WebDriverResult<Vec<Cookie>>
[src]
fn get_cookie(&self, name: &str) -> WebDriverResult<Cookie>
[src]
fn delete_cookie(&self, name: &str) -> WebDriverResult<()>
[src]
fn delete_all_cookies(&self) -> WebDriverResult<()>
[src]
fn add_cookie(&self, cookie: Cookie) -> WebDriverResult<()>
[src]
fn screenshot_as_base64(&self) -> WebDriverResult<String>
[src]
fn screenshot_as_png(&self) -> WebDriverResult<Vec<u8>>
[src]
fn screenshot(&self, path: &Path) -> WebDriverResult<()>
[src]
fn switch_to(&self) -> SwitchTo
[src]
fn set_window_name(&self, window_name: &str) -> WebDriverResult<()>
[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,
T: Unpin,
impl<T> !UnwindSafe for GenericWebDriver<T>
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,
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, 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.
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>,