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 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§
§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.
exact: Option<bool>Whether name matching is exact (case-sensitive, full-string).
Default is false (case-insensitive substring).
pressed: Option<bool>Whether the element is pressed (for toggle buttons).
Trait Implementations§
Source§impl Clone for GetByRoleOptions
impl Clone for GetByRoleOptions
Source§fn clone(&self) -> GetByRoleOptions
fn clone(&self) -> GetByRoleOptions
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for GetByRoleOptions
impl Debug for GetByRoleOptions
Source§impl Default for GetByRoleOptions
impl Default for GetByRoleOptions
Source§fn default() -> GetByRoleOptions
fn default() -> GetByRoleOptions
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for GetByRoleOptions
impl RefUnwindSafe for GetByRoleOptions
impl Send for GetByRoleOptions
impl Sync for GetByRoleOptions
impl Unpin for GetByRoleOptions
impl UnsafeUnpin for GetByRoleOptions
impl UnwindSafe for GetByRoleOptions
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