Struct webdriver_client::DriverSession
[−]
[src]
pub struct DriverSession { /* fields omitted */ }
A WebDriver session.
By default the session is removed on Drop
Methods
impl DriverSession
[src]
pub fn create_session(
driver: Box<Driver>,
params: &NewSessionCmd
) -> Result<DriverSession, Error>
[src]
driver: Box<Driver>,
params: &NewSessionCmd
) -> Result<DriverSession, Error>
Create a new session with the driver.
pub fn attach(url: &str, session_id: &str) -> Result<DriverSession, Error>
[src]
Use an existing session
pub fn browser_name(&self) -> Option<&str>
[src]
pub fn session_id(&self) -> &str
[src]
pub fn drop_session(&mut self, drop: bool)
[src]
Whether to remove the session on Drop, the default is true
pub fn go(&self, url: &str) -> Result<(), Error>
[src]
Navigate to the given URL
pub fn get_current_url(&self) -> Result<String, Error>
[src]
pub fn back(&self) -> Result<(), Error>
[src]
pub fn forward(&self) -> Result<(), Error>
[src]
pub fn refresh(&self) -> Result<(), Error>
[src]
pub fn get_page_source(&self) -> Result<String, Error>
[src]
pub fn get_title(&self) -> Result<String, Error>
[src]
[src]
Get all cookies
pub fn get_window_handle(&self) -> Result<String, Error>
[src]
pub fn switch_window(&mut self, handle: &str) -> Result<(), Error>
[src]
pub fn close_window(&mut self) -> Result<(), Error>
[src]
pub fn get_window_handles(&self) -> Result<Vec<String>, Error>
[src]
pub fn find_element(
&self,
selector: &str,
strategy: LocationStrategy
) -> Result<Element, Error>
[src]
&self,
selector: &str,
strategy: LocationStrategy
) -> Result<Element, Error>
pub fn find_elements(
&self,
selector: &str,
strategy: LocationStrategy
) -> Result<Vec<Element>, Error>
[src]
&self,
selector: &str,
strategy: LocationStrategy
) -> Result<Vec<Element>, Error>
pub fn execute(&self, script: ExecuteCmd) -> Result<JsonValue, Error>
[src]
pub fn execute_async(&self, script: ExecuteCmd) -> Result<JsonValue, Error>
[src]
pub fn switch_to_frame(&self, handle: JsonValue) -> Result<(), Error>
[src]
Valid values are element references as returned by Element::reference() or null to switch to the top level frame