Struct augdom::testing::Finder [−][src]
pub struct Finder<'n, N> { /* fields omitted */ }
Expand description
Executes a search strategy over a DOM container’s subtree via depth-first pre-order traversal.
Implementations
pub fn by_label_text<'find, 'pat>(
&'find self,
pattern: &'pat str
) -> Found<'find, 'pat, 'node, N>
pub fn by_label_text<'find, 'pat>(
&'find self,
pattern: &'pat str
) -> Found<'find, 'pat, 'node, N>
Find by label
’s or aria-label
’s normalized text content.
The default choice for selecting form elements as it most closely mirrors how users interact with forms.
pub fn by_placeholder_text<'find, 'pat>(
&'find self,
pattern: &'pat str
) -> Found<'find, 'pat, 'node, N>
pub fn by_placeholder_text<'find, 'pat>(
&'find self,
pattern: &'pat str
) -> Found<'find, 'pat, 'node, N>
Find by input
’s placeholder
value.
Used for form fields, choose if Finder::by_label_text
is not available.
Find by aria role
.
The default choice for interactive elements like buttons.
Find by element’s normalized text content.
pub fn by_display_value<'find, 'pat>(
&'find self,
pattern: &'pat str
) -> Found<'find, 'pat, 'node, N>
pub fn by_display_value<'find, 'pat>(
&'find self,
pattern: &'pat str
) -> Found<'find, 'pat, 'node, N>
Find by form element’s current value
.
pub fn by_alt_text<'find, 'pat>(
&'find self,
pattern: &'pat str
) -> Found<'find, 'pat, 'node, N>
pub fn by_alt_text<'find, 'pat>(
&'find self,
pattern: &'pat str
) -> Found<'find, 'pat, 'node, N>
Find by img
’s alt
attribute.
Find by title
attribute’s or svg title
tag’s normalized text content.
pub fn by_test_id<'find, 'pat>(
&'find self,
pattern: &'pat str
) -> Found<'find, 'pat, 'node, N>
pub fn by_test_id<'find, 'pat>(
&'find self,
pattern: &'pat str
) -> Found<'find, 'pat, 'node, N>
Find by data-testid
attribute. Not visible to humans, only
use as a last resort.
Trait Implementations
Auto Trait Implementations
impl<'n, N> RefUnwindSafe for Finder<'n, N> where
N: RefUnwindSafe,
impl<'n, N> UnwindSafe for Finder<'n, N> where
N: RefUnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more