Lesson:Locators - async behaviour/polling

In the previous lesson we covered how to find and make assertions against a single HTML element.

But those examples were when the element was already present on the page (no async or re-rendering behavior required before it appears).

In this lesson we will show how to query for elements that will appear.

(Basically: keep retrying for a few seconds until the query matches... or until it times out and the test assertion will fail).

This is similar to await screen.findBy...() functions in React Testing Library.

Loading full lesson...