Position-based selectors cause a bug that is worse than a failing test. Here it is.
Fern Market is an invented plant shop. A test adds Snake Plant to the basket. Snake Plant is the first card on the page, so the test uses its position:
A selector based on position breaks the next time someone edits the page. Find elements by what they are instead.
Position-based selectors cause a bug that is worse than a failing test. Here it is.
Fern Market is an invented plant shop. A test adds Snake Plant to the basket. Snake Plant is the first card on the page, so the test uses its position:
full course
The Foundations track and the first lessons in each framework are free. This lesson needs full course access. A course plan includes all lessons for Playwright, Cypress and Selenium.
See course plans →