React Testing Library · Module
getAllByAltText
getAllByAltText returns all elements with matching alt text. It throws when no element matches.
Last updated
Syntax
getAllByAltText(text: TextMatch, options?: { exact?: boolean; normalizer?: NormalizerFn }): HTMLElement[]In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
getByAltTextqueryByAltTextqueryAllByAltTextfindByAltTextfindAllByAltTextscreenTextMatch