Skip to main content

Function: queryByRole()

queryByRole(container, role, options?): Widget | null

Defined in: queries.ts:131

Finds a single element matching a role without throwing.

Parameters

ParameterTypeDescription
containerContainerThe container to search within
roleAccessibleRoleThe GTK accessible role to match
options?ByRoleOptionsQuery options including name and state filters

Returns

Widget | null

The matching widget or null if not found

Throws

Error if multiple elements match