pub trait TestQueryExt {
// Required methods
fn elements(&self) -> Vec<ElementSnapshot>;
fn texts(&self) -> Vec<TextSnapshot>;
fn find_by_label(&self, label: &str) -> ElementSnapshot;
fn try_find_by_label(&self, label: &str) -> Option<ElementSnapshot>;
fn find_all_by_label(&self, label: &str) -> Vec<ElementSnapshot>;
fn find_all_by_role(&self, role: Role) -> Vec<ElementSnapshot>;
}Expand description
Accessibility-oriented observation queries over a Window or ScopedWindow.
Required Methods§
Sourcefn elements(&self) -> Vec<ElementSnapshot>
fn elements(&self) -> Vec<ElementSnapshot>
Returns all observed elements in the current scope from the last completed
frame (including invisible ones), ordered by (y, x, path).
Sourcefn texts(&self) -> Vec<TextSnapshot>
fn texts(&self) -> Vec<TextSnapshot>
Returns observed text runs painted in the current scope during the last frame.
Sourcefn find_by_label(&self, label: &str) -> ElementSnapshot
fn find_by_label(&self, label: &str) -> ElementSnapshot
Returns the uniquely matching element whose exact, case-sensitive native
accessibility label equals label. Panics on absence or ambiguity.
Sourcefn try_find_by_label(&self, label: &str) -> Option<ElementSnapshot>
fn try_find_by_label(&self, label: &str) -> Option<ElementSnapshot>
Returns the uniquely matching element with accessibility label label,
or None if absent. Panics on ambiguity.
Sourcefn find_all_by_label(&self, label: &str) -> Vec<ElementSnapshot>
fn find_all_by_label(&self, label: &str) -> Vec<ElementSnapshot>
Returns all elements with exact accessibility label label, ordered by (y, x, path).
Sourcefn find_all_by_role(&self, role: Role) -> Vec<ElementSnapshot>
fn find_all_by_role(&self, role: Role) -> Vec<ElementSnapshot>
Returns all elements with native AccessKit Role role, ordered by (y, x, path).
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".