#[non_exhaustive]pub struct GetByRoleOptions {
pub checked: Option<bool>,
pub disabled: Option<bool>,
pub selected: Option<bool>,
pub expanded: Option<bool>,
pub include_hidden: Option<bool>,
pub level: Option<u32>,
pub name: Option<String>,
pub description: Option<String>,
pub exact: Option<bool>,
pub pressed: Option<bool>,
}Expand description
Options for get_by_role() locator.
All fields are optional. When not specified, the property is not included in the role selector, meaning it matches any value.
See: https://playwright.dev/docs/api/class-page#page-get-by-role
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.checked: Option<bool>Whether the element is checked (for checkboxes, radio buttons).
disabled: Option<bool>Whether the element is disabled.
selected: Option<bool>Whether the element is selected (for options).
expanded: Option<bool>Whether the element is expanded (for tree items, comboboxes).
Whether to include hidden elements.
level: Option<u32>The heading level (1-6, for heading role).
name: Option<String>The accessible name of the element.
description: Option<String>The accessible description of the element (WAI-ARIA), matched in addition
to role/name. Honors exact like name.
exact: Option<bool>Whether name/description matching is exact (case-sensitive,
full-string). Default is false (case-insensitive substring).
pressed: Option<bool>Whether the element is pressed (for toggle buttons).
Implementations§
Source§impl GetByRoleOptions
impl GetByRoleOptions
Trait Implementations§
Source§impl Clone for GetByRoleOptions
impl Clone for GetByRoleOptions
Source§fn clone(&self) -> GetByRoleOptions
fn clone(&self) -> GetByRoleOptions
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more