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.
SubscribeRelated
getByTextqueryByTextfindAllByTextwaitForgetByRole