Testing · Junior · Question 62 of 78

What is the recommended way to find a button in Playwright?

Explanation

User-facing locators survive markup changes; long CSS and XPath chains break on any refactor.

Further reading

Problem with a question

Testing · Junior · question 62

Test yourself

Take the Testing · Junior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz