Skip to main content

externalByRoleSelectorOptions

Index

Properties

externaloptionalchecked

checked?: boolean

An attribute that is usually set by aria-checked or native <input type=checkbox> controls.

Playwright only

This property is supported only by Playwright.

externaloptionaldisabled

disabled?: boolean

An attribute that is usually set by aria-disabled or disabled.

NOTE Unlike most other attributes, disabled is inherited through the DOM hierarchy. Learn more about aria-disabled.

Playwright only

This property is supported only by Playwright.

externaloptionalexact

exact?: boolean

Whether name is matched exactly: case-sensitive and whole-string.

Playwright matching defaults

Playwright defaults to false for backwards compatibility, but we recommend setting this property to true to avoid unintentional matches.

Playwright and name RegExp

Playwright supports using a RegExp to match the name. When using a RegExp, exact matching is not applicable and this option is ignored. Note that exact match still trims whitespace.

WebdriverIO

WebdriverIO always performs exact matching, so this option is ignored.

externaloptionalexpanded

expanded?: boolean

An attribute that is usually set by aria-expanded.

Learn more about aria-expanded.

Playwright only

This property is supported only by Playwright.

externaloptionalincludeHidden

includeHidden?: boolean

Option that controls whether hidden elements are matched. By default, only non-hidden elements, as defined by ARIA, are matched by role selector.

Learn more about aria-hidden.

Playwright only

This property is supported only by Playwright.

externaloptionallevel

level?: number

A number attribute that is usually present for roles heading, listitem, row, treeitem, with default values for <h1>-<h6> elements.

Learn more about aria-level.

Playwright only

This property is supported only by Playwright.

externaloptionalname

name?: string | RegExp

Option to match the accessible name.

Playwright

Only Playwright supports using a RegExp to match the name. When using a string instead, Playwright performs a case-insensitive match and searches for a substring. Use exact to control this behavior.

WebdriverIO

WebdriverIO does not support using RegExp and performs a case-sensitive and exact matching.

externaloptionalpressed

pressed?: boolean

An attribute that is usually set by aria-pressed.

Playwright only

This property is supported only by Playwright.

externaloptionalselected

selected?: boolean

An attribute that is usually set by aria-selected.

Playwright only

This property is supported only by Playwright.