[][src]Struct selenium_rs::element::Element

pub struct Element<'a> { /* fields omitted */ }

Element provides an interface from which to inspect and interact with the requested elements on the page. The general flow involves navigating to your webpage in question, and then requesting a specific element through the query API, and then using the returned element to inspect the element on the page

Methods

impl<'a> Element<'a>[src]

pub fn new(
    element_id: String,
    session_id: String,
    client: &'a Client
) -> Element<'a>
[src]

impl<'a> Element<'a>[src]

pub fn is_selected(&self) -> Result<bool>[src]

pub fn get_attribute(&self, attribute: &str) -> Result<String>[src]

gets an element attribute for the given element

pub fn get_property(&self, property: &str) -> Result<String>[src]

retrieves the property value for the given element, if it exists

pub fn get_css_value(&self, css_property: &str) -> Result<String>[src]

Gets a css property for the given element, if it exists

pub fn get_text(&self) -> Result<String>[src]

Gets the text for a given element, if it exists or makes sense

impl<'a> Element<'a>[src]

pub fn click(&self) -> Result<()>[src]

pub fn clear(&self) -> Result<()>[src]

Clears a content editable element's text value, or returns an error

pub fn type_text(&self, input: &str) -> Result<()>[src]

Tries to type into a content editable element

Trait Implementations

impl<'a> Debug for Element<'a>[src]

Auto Trait Implementations

impl<'a> !RefUnwindSafe for Element<'a>

impl<'a> Send for Element<'a>

impl<'a> Sync for Element<'a>

impl<'a> Unpin for Element<'a>

impl<'a> !UnwindSafe for Element<'a>

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.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

type Err = <U as TryFrom<T>>::Err