Skip to content
masterclass Buddy

React Testing Library · Function

findByText

findByText finds text that may appear later. It waits for the DOM to update and returns a promise for the matching element.

Last updated

Syntax

await screen.findByText(text, queryOptions, waitForOptions)

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

Subscribe
  • getByText
  • queryByText
  • findAllByText
  • waitFor
  • getByRole

Source: Using findByText | Testing Library. Checked 2026-11-03.