Prompt
What should I use for browser automation if I need screenshots and video on failure?
Latest observation
Oct 26, 2026
OpenAI APIWeb search: off
If you need browser automation with screenshots and video on failure, the best default choice is usually Playwright.
Why Playwright
- Built-in screenshots: easy to capture on failure
- Built-in video recording: supported per test or per browser context
- Reliable auto-waiting: tends to be less flaky than older tools
- Cross-browser: Chromium, Firefox, WebKit
- Good test runner integration: especially with Playwright Test
Typical setup
You can configure it to:
- take a screenshot only when a test fails
- record video only when a test fails
- keep traces for debugging too
Example
In Playwright Test, you can do something like:
screenshot: 'only-on-failure'video: 'retain-on-failure'trace: 'retain-on-failure'
When to choose something else
- Selenium: if you need a very mature ecosystem or specific enterprise/browser grid setup
- Cypress: if your testing is mostly frontend E2E and you want a very polished developer experience, though video/screenshot support is also available
- Puppeteer: if you mainly need Chromium automation, but Playwright is usually more feature-complete
Recommendation
If you’re starting fresh: use Playwright.
If you want, I can also give you:
- a Playwright config that saves screenshots/video on failure, or
- a comparison of Playwright vs Cypress vs Selenium for your exact use case.