Python browser automation for testing, scraping and stealth
open sourceMITself-hostablefreeMCP
SeleniumBase is an MIT-licensed Python framework for browser automation: end-to-end testing with pytest, web scraping, and completing tasks on sites that block bots. It wraps Selenium/WebDriver and adds UC Mode and CDP Mode, which drive Chromium-based browsers in ways that avoid bot detection, a stealthy Playwright mode, and solve_captcha() for click-based CAPTCHAs. It also ships a test recorder, dashboards and reports, visual testing, a Selenium Grid farm, website tours, presentations and charts, and an sbase command line. Over 200 example tests show the patterns. An MCP server (seleniumbase-mcp, installed with the mcp extra) lets AI clients drive a stealth browser, and the repository has AGENTS.md and SKILLS.md playbooks for coding agents.
Problems it solves
- my Selenium scraper keeps getting blocked by Cloudflare bot detection
- write reliable end-to-end browser tests in Python with pytest
- automate a website that shows a CAPTCHA checkbox
- give my AI agent a stealth browser over MCP for scraping
- record browser actions and turn them into Python tests
- run Playwright through an undetected Chrome browser
Features
- pytest integration and several syntax formats (BaseCase, SB, Driver, Pure CDP Mode)
- UC Mode and CDP Mode to avoid bot detection in Chromium-based browsers
- Stealthy Playwright Mode
- solve_captcha() for click-based CAPTCHAs
- test recorder that generates scripts
- dashboard, reports, visual testing and Selenium Grid farm
- website tours, presentations and charts
- sbase command line tools
- MCP server over stdio (seleniumbase-mcp)
- AGENTS.md and SKILLS.md guidance for AI agents
Capabilities
| Has a command line tool | plan not known |
|---|---|
| Has an MCP server | plan not known |
| Has official SDKs | plan not known |
Alternatives
The same job
These do what SeleniumBase does.
- Selenium Automate any browser, from any language.
- Playwright MCP Playwright MCP server: browser automation for AI agents through accessibility snapshots
