React Testing Library · Function
getRoles
getRoles groups elements in a DOM tree by their implicit ARIA role. It returns an object where each role name maps to an array of matching elements.
Last updated
Syntax
getRoles(container)In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
getByRoleisInaccessiblelogRoles