pub enum Selector {
Css(String),
Text {
text: String,
exact: bool,
},
Role {
role: AriaRole,
name: Option<String>,
},
TestId(String),
Label(String),
Placeholder(String),
Chained(Box<Selector>, Box<Selector>),
Nth {
base: Box<Selector>,
index: i32,
},
}Expand description
Selector for finding elements.
Variants§
Css(String)
CSS selector.
Text
Text content selector.
Role
ARIA role selector.
TestId(String)
Test ID selector (data-testid attribute).
Label(String)
Label selector (for form controls).
Placeholder(String)
Placeholder selector (for inputs).
Chained(Box<Selector>, Box<Selector>)
Chained selector (parent >> child).
Nth
Nth element selector.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Selector
impl RefUnwindSafe for Selector
impl Send for Selector
impl Sync for Selector
impl Unpin for Selector
impl UnwindSafe for Selector
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