React Testing Library · Module
getAllByTitle
getByTitle finds one element by its title attribute or an SVG title element. In React Testing Library, use screen.getByTitle(...) after rendering.
Last updated
Syntax
getByTitle(container: HTMLElement, title: TextMatch, options?: { exact?: boolean; normalizer?: NormalizerFn }): HTMLElementIn-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
queryByTitlegetAllByTitlequeryAllByTitlefindByTitlefindAllByTitlescreenwithin