pub struct Element<'a> { /* private fields */ }
Expand description
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
Implementations§
Source§impl<'a> Element<'a>
impl<'a> Element<'a>
pub fn is_selected(&self) -> Result<bool>
Sourcepub fn get_attribute(&self, attribute: &str) -> Result<String>
pub fn get_attribute(&self, attribute: &str) -> Result<String>
gets an element attribute for the given element
Sourcepub fn get_property(&self, property: &str) -> Result<String>
pub fn get_property(&self, property: &str) -> Result<String>
retrieves the property value for the given element, if it exists
Sourcepub fn get_css_value(&self, css_property: &str) -> Result<String>
pub fn get_css_value(&self, css_property: &str) -> Result<String>
Gets a css property for the given element, if it exists
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Element<'a>
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§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more