Function: findByRole()
findByRole(
container,role,options?):Promise<Widget>
Defined in: queries.ts:354
Finds a single element by accessible role.
Waits for the element to appear, throwing if not found within timeout.
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, state filters, and timeout |
Returns
Promise<Widget>
Promise resolving to the matching widget
Example
const button = await findByRole(container, Gtk.AccessibleRole.BUTTON, { name: "Submit" });