Playwright · Junior · Question 69 of 75

What does getByRole('heading', { name: 'Pricing', exact: true }) add with exact?

Show the answer

Correct answer: The name must match fully and case-sensitively

Explanation

Without exact, the name is a case-insensitive substring, so "Pricing plans" would also match.

Further reading

Problem with a question

Playwright · Junior · question 69

Test yourself

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

Take this quiz