Testing
findByRole
Asynchronous query that retries until one match is found or timeout occurs.
Formal Syntax & Structure
react syntaxreact
await screen.findByRole("alert")Working Example
Example Snippetreact
await screen.findByRole("alert")Asynchronous query that retries until one match is found or timeout occurs.
await screen.findByRole("alert")await screen.findByRole("alert")