Playwright · Middle · Question 29 of 75
What happens the first time toHaveScreenshot() runs?
- 1It passes and uploads the image to the cloud
- 2It compares with a stock image from Playwright
- 3It fails and saves a baseline image
Show the answer
Correct answer: It fails and saves a baseline image
Explanation
There's nothing to compare against yet, so it writes the expected image. Later runs compare against it. --update-snapshots refreshes baselines on purpose.