> For AI agents: the complete documentation index is available at /next/llms.txt, the full documentation bundle is available at /next/llms-full.txt.

# Type Alias: FindByRole\<T _extends_ `HTMLElement` = `HTMLElement`>

> **FindByRole**\<`T` _extends_ `HTMLElement` = `HTMLElement`> = (`container`: `HTMLElement`, `role`: [`ByRoleMatcher`](/next/api/react/testing-library/Type_Aliases/ByRoleMatcher.md), `options?`: [`ByRoleOptions`](/next/api/react/testing-library/Interfaces/ByRoleOptions.md), `waitForElementOptions?`: [`waitForOptions`](/next/api/react/testing-library/Interfaces/waitForOptions.md)) => `Promise`\<`T`>

## Type Parameters

| Type Parameter              | Default type  |
| --------------------------- | ------------- |
| `T` _extends_ `HTMLElement` | `HTMLElement` |

## Parameters

| Parameter                | Type                                                                             |
| ------------------------ | -------------------------------------------------------------------------------- |
| `container`              | `HTMLElement`                                                                    |
| `role`                   | [`ByRoleMatcher`](/next/api/react/testing-library/Type_Aliases/ByRoleMatcher.md) |
| `options?`               | [`ByRoleOptions`](/next/api/react/testing-library/Interfaces/ByRoleOptions.md)   |
| `waitForElementOptions?` | [`waitForOptions`](/next/api/react/testing-library/Interfaces/waitForOptions.md) |

## Returns

`Promise`\<`T`>
