pub enum Locator<'a> {
Css(&'a str),
Id(&'a str),
LinkText(&'a str),
XPath(&'a str),
}
Expand description
An element locator.
See the specification for more details.
Variants§
Css(&'a str)
Find an element matching the given CSS selector.
Id(&'a str)
Find an element using the given id
.
LinkText(&'a str)
Find a link element with the given link text.
The text matching is exact.
XPath(&'a str)
Find an element using the given XPath expression.
You can address pretty much any element this way, if you’re willing to put in the time to find the right XPath.
Trait Implementations§
Source§impl<'a> Ord for Locator<'a>
impl<'a> Ord for Locator<'a>
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<'a> PartialOrd for Locator<'a>
impl<'a> PartialOrd for Locator<'a>
impl<'a> Copy for Locator<'a>
impl<'a> Eq for Locator<'a>
impl<'a> StructuralPartialEq for Locator<'a>
Auto Trait Implementations§
impl<'a> Freeze for Locator<'a>
impl<'a> RefUnwindSafe for Locator<'a>
impl<'a> Send for Locator<'a>
impl<'a> Sync for Locator<'a>
impl<'a> Unpin for Locator<'a>
impl<'a> UnwindSafe for Locator<'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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.