Playwright · Junior · Question 18 of 75

What does getByText('Welcome') match by default?

Show the answer

Correct answer: Elements containing that text, case-insensitive

Explanation

By default matching is a case-insensitive substring with whitespace normalized. Pass { exact: true } for exact matching or a regular expression for patterns.

Further reading

Problem with a question

Playwright · Junior · question 18

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