Playwright · Junior · Question 70 of 75

Which assertion checks the page <title>?

Show the answer

Correct answer: await expect(page).toHaveTitle(/Dashboard/)

Explanation

toHaveTitle retries until the document title matches a string or regular expression.

Further reading

Problem with a question

Playwright · Junior · question 70

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