Playwright · Junior · Question 69 of 75
What does getByRole('heading', { name: 'Pricing', exact: true }) add with exact?
- 1The name must match fully and case-sensitively
- 2The heading must be the first one on the page
- 3Only
<h1>headings are matched, not<h2>
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.