Playwright · Junior · Question 53 of 75
What does screenshot: 'only-on-failure' in use do?
- 1Fails a test if any screenshot changed since last run
- 2Attaches a screenshot to the report when a test fails
- 3Takes a screenshot after every single action
Show the answer
Correct answer: Attaches a screenshot to the report when a test fails
Explanation
Failure screenshots help diagnose problems without rerunning. Videos and traces have similar options.