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

# Function: getAllByRole()

> **getAllByRole**\<`T` _extends_ `HTMLElement` = `HTMLElement`>(...`args`: \[`HTMLElement`, `any`, [`ByRoleOptions`](/next/api/react/testing-library/Interfaces/ByRoleOptions.md)]): `T`\[]

## Type Parameters

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

## Parameters

| Parameter | Type                                                                                                    |
| --------- | ------------------------------------------------------------------------------------------------------- |
| ...`args` | \[`HTMLElement`, `any`, [`ByRoleOptions`](/next/api/react/testing-library/Interfaces/ByRoleOptions.md)] |

## Returns

`T`\[]
