Skip to content
masterclass Buddy

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 }): HTMLElement

In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.

Subscribe
  • queryByTitle
  • getAllByTitle
  • queryAllByTitle
  • findByTitle
  • findAllByTitle
  • screen
  • within

Source: ByTitle | Testing Library. Checked 2026-11-03.