Playwright · Middle · Question 34 of 75
How do you find list items that do NOT contain a "Sold out" label?
- 1
items.filter({ hasNotText: 'Sold out' }) - 2
items.exclude('Sold out') - 3
items.not.filter({ hasText: 'Sold out' })
Show the answer
Correct answer: items.filter({ hasNotText: 'Sold out' })
Explanation
hasNot and hasNotText remove matches containing an element or text.