Prompt
I'm building a browser automation workflow that needs to run in CI, any tool suggestions?
Latest observation
Oct 13, 2026
OpenAI APIWeb search: off
Yes — for browser automation that needs to run reliably in CI, the main choices are:
Best general-purpose options
1. Playwright
My top recommendation for CI.
Why it’s good:
- Very stable in headless CI environments
- Works with Chromium, Firefox, and WebKit
- Built-in auto-waiting reduces flaky tests
- Great debugging tools: trace viewer, screenshots, video, network logs
- Easy to run in Docker and common CI systems
Best for:
- End-to-end testing
- Browser workflows/automation
- Cross-browser support
- Teams that want less flakiness
2. Puppeteer
Good if you only need Chromium/Chrome automation.
Why it’s good:
- Mature and widely used
- Simple API
- Strong for Chrome-specific workflows
- Good for scraping, PDF generation, screenshots, and automation
Tradeoff:
- Mainly Chromium-focused
- Less ideal than Playwright for multi-browser CI testing
Best for:
- Chrome-only automation
- Internal workflows
- Headless browser tasks
3. Selenium
Best if you need broad ecosystem support or already have Selenium infrastructure.
Why it’s good:
- Very widely supported
- Lots of language bindings
- Works with many browsers and grid setups
Tradeoff:
- More boilerplate
- Often more flaky/less ergonomic than Playwright
- CI setup can be heavier
Best for:
- Existing Selenium teams
- Large browser grids
- Legacy test suites
If your workflow is more “automation script” than “test suite”
4. Playwright + persistent context
Great when you want:
- Saved login/session state
- Reusable authenticated browser state
- Scripted workflows in CI
5. Browserless / remote browsers
Useful if you don’t want to manage browsers in CI directly.
Examples:
- Browserless
- Playwright running against a remote Chromium
- Selenium Grid
Best for:
- Scaling
- Keeping CI images smaller
- Centralized browser infrastructure
CI reliability tips
Whichever tool you choose:
- Prefer headless mode
- Pin browser/tool versions
- Run in a Docker container or known CI image
- Capture screenshots/videos/traces on failure
- Avoid fixed sleeps; use waits/assertions
- Make test data deterministic
- If using GitHub Actions, use the tool’s recommended CI setup
Quick recommendation
- Use Playwright if you’re starting fresh.
- Use Puppeteer if you only need Chrome and want something lightweight.
- Use Selenium if you need compatibility with an existing setup.
If you want, I can also suggest a setup specifically for:
- GitHub Actions
- Docker
- Node.js / Python / Java / .NET
- scraping vs testing vs RPA-style automation