Function: queryByRole()
queryByRole(
container,role,options?):Widget|null
Defined in: queries.ts:131
Finds a single element matching a role without throwing.
Parameters
| Parameter | Type | Description |
|---|---|---|
container | Container | The container to search within |
role | AccessibleRole | The GTK accessible role to match |
options? | ByRoleOptions | Query options including name and state filters |
Returns
Widget | null
The matching widget or null if not found
Throws
Error if multiple elements match