API Reference / @gtkx/testing / queryAllByRole
Function: queryAllByRole()
queryAllByRole<
T>(container,role,options?):T[]
Defined in: packages/testing/src/queries.ts:330
Finds every widget under the container whose accessible role matches role and that satisfies the given options. Widgets that are not mapped are never matched, and widgets excluded from the accessibility tree are skipped unless options.hidden is set.
Type Parameters
T
T extends Accessible = Widget
Parameters
container
Widget subtree to search.
role
AccessibleRole
Accessible role to match.
options?
Additional accessible name, state, and value constraints.
Returns
T[]
Every matching widget, or an empty array when none match.