Skip to content

API Reference / @gtkx/testing / queryAllByRole

Function: queryAllByRole()

queryAllByRole(container, role, options?): Widget[]

Defined in: queries.d.ts:149

Finds every widget under the container whose accessible role matches role and that satisfies the given options. Widgets excluded from the accessibility tree are skipped unless options.hidden is set.

Parameters

container

Container

Widget subtree to search.

role

AccessibleRole

Accessible role to match.

options?

ByRoleOptions

Additional accessible name, state, and value constraints.

Returns

Widget[]

Every matching widget, or an empty array when none match.

Released under the MPL-2.0 License.