React Testing Library · Function
findByRole
findByRole asynchronously finds one element by its accessible role. Use options such as name or description to distinguish matching elements.
Last updated
Syntax
findByRole(role, options?)In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
getByRolequeryByRolegetAllByRolequeryAllByRolefindAllByRolescreenwithin