React Testing Library · Module
getAllByLabelText
getAllByLabelText finds all form controls connected to matching label text. It returns an array and throws when no control matches.
Last updated
Syntax
getAllByLabelText(container: HTMLElement, text: TextMatch, options?: { selector?: string; exact?: boolean; normalizer?: NormalizerFn }): HTMLElement[]In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
getByLabelTextqueryByLabelTextgetAllByLabelTextqueryAllByLabelTextfindByLabelTextfindAllByLabelTextgetByRolescreen