pub enum By {
Role(String, Option<Options>),
Text(String, Option<Options>),
LabelText(String, Option<Options>),
PlaceholderText(String, Option<Options>),
DisplayValue(String, Option<Options>),
AltText(String, Option<Options>),
Title(String, Option<Options>),
TestId(String, Option<Options>),
}
Expand description
Selector enum for unified DOM queries
Variants§
Role(String, Option<Options>)
Query by element role
Text(String, Option<Options>)
Query by text content
LabelText(String, Option<Options>)
Query by label text
PlaceholderText(String, Option<Options>)
Query by placeholder text
DisplayValue(String, Option<Options>)
Query by display value
AltText(String, Option<Options>)
Query by alt text
Title(String, Option<Options>)
Query by title
TestId(String, Option<Options>)
Query by test ID
Implementations§
Source§impl By
impl By
Sourcepub fn role(value: &str) -> RoleSelector
pub fn role(value: &str) -> RoleSelector
Create a role selector without options
Sourcepub fn text(value: &str) -> SimpleSelector
pub fn text(value: &str) -> SimpleSelector
Create a text selector without options
Sourcepub fn label_text(value: &str) -> LabelTextSelector
pub fn label_text(value: &str) -> LabelTextSelector
Create a label text selector without options
Sourcepub fn placeholder_text(value: &str) -> SimpleSelector
pub fn placeholder_text(value: &str) -> SimpleSelector
Create a placeholder text selector without options
Sourcepub fn display_value(value: &str) -> SimpleSelector
pub fn display_value(value: &str) -> SimpleSelector
Create a display value selector without options
Sourcepub fn alt_text(value: &str) -> SimpleSelector
pub fn alt_text(value: &str) -> SimpleSelector
Create an alt text selector without options
Sourcepub fn title(value: &str) -> SimpleSelector
pub fn title(value: &str) -> SimpleSelector
Create a title selector without options
Sourcepub fn test_id(value: &str) -> SimpleSelector
pub fn test_id(value: &str) -> SimpleSelector
Create a test ID selector without options
Trait Implementations§
Source§impl From<LabelTextSelector> for By
impl From<LabelTextSelector> for By
Source§fn from(selector: LabelTextSelector) -> Self
fn from(selector: LabelTextSelector) -> Self
Converts to this type from the input type.
Source§impl From<RoleSelector> for By
impl From<RoleSelector> for By
Source§fn from(selector: RoleSelector) -> Self
fn from(selector: RoleSelector) -> Self
Converts to this type from the input type.
Source§impl From<SimpleSelector> for By
impl From<SimpleSelector> for By
Source§fn from(selector: SimpleSelector) -> Self
fn from(selector: SimpleSelector) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for By
impl RefUnwindSafe for By
impl Send for By
impl Sync for By
impl Unpin for By
impl UnwindSafe for By
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