Lesson:Locators - getting a single element

When writing tests, the most important thing apart from rendering the component is querying for elements in the DOM.

And the most common thing to know is how to query for a single element in Vitest Browser Mode and make assertions against that element.

In this lesson we will cover how to get a single element. Some of this was already covered in the last couple of lessons, so this lesson will whizz through it quicker, as a bit of a refresher.

Loading full lesson...