Playwright · Senior · Question 50 of 77

What does toHaveScreenshot do to reduce flakiness before comparing?

Show the answer

Correct answer: Waits until two screenshots in a row are identical

Explanation

It retries capturing until the page is stable, then compares with the baseline using the configured threshold.

Further reading

Problem with a question

Playwright · Senior · question 50

Test yourself

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

Take this quiz