Skip to content

SeleniumBase

Python framework for browser automation, testing, and scraping, with optional stealth browser features.

Stars
13.2k
Forks
1.6k
Licence
MIT
Language
Python
Last update
8 days ago
Type
Library

What it is

SeleniumBase is a Python framework for controlling web browsers. It is used to automate browser tasks, write end-to-end tests of websites, and scrape web pages. Its README says it includes a CDP Mode that launches a browser meant to get past bot-detection and CAPTCHAs, and that it can add stealth features to Playwright.

  • Write pytest-based end-to-end tests that open pages, type into fields, and check results
  • Run a Python script that opens a site in a stealth browser and checks for bot-detection signals
  • Automate logging into a website and solving a CAPTCHA with the solve_captcha call shown in the README
  • Use the included MCP server to let an AI agent control a browser

Great for

  • Python developers writing automated browser tests for websites
  • People who already use Selenium or pytest and want a higher-level API
  • Developers building scrapers for sites that block standard automated browsers
  • Teams wanting an MCP server so AI agents can drive a browser

Not ideal for

  • Non-programmers looking for a no-code tool, since it requires writing Python
  • Anyone needing a guaranteed way around bot-detection or CAPTCHAs, since the README makes claims about bypassing them without guarantees and sites change their defenses
  • Projects requiring a non-Python language, since the primary language is Python
Step-by-step guide: how to use SeleniumBaseInstall, first run, examples, tips and FAQs

How to get it

  1. 1

    Install with a package manager

    You'll need: Python

    Install from PyPI

    pip install seleniumbase
  2. 2

    Run it

    • Install the package with pip install seleniumbase
    • Write a short Python script that imports sb_cdp from seleniumbase
    • Launch a browser with sb_cdp.Chrome() and navigate with sb.goto(url)
    • Close the browser with sb.quit() at the end of the script
  3. 3

    Get the most out of it

    • Use pytest-style scripts (files starting or ending with test) for structured test runs, as described in the README
    • Read the CDP Mode docs linked in the README to learn the stealth API
    • Try the Stealthy Playwright example if you already use Playwright
    • Explore the MCP server documentation if you want AI agents to control the browser

Downloads

Strengths

  • Built on Python and pytest, so it fits into common Python testing workflows
  • Includes many features in one package, such as a recorder, dashboard, and reports, per the README keywords
  • Uses the MIT license, which permits free use and modification

Trade-offs

  • Bypass claims for bot-detection and CAPTCHAs are stated by the project and are not independently verified in this README
  • Stealth and anti-bot features depend on ongoing maintenance as target sites change
  • The README is long and links out to many separate docs, so the full scope takes effort to learn

How it compares

ProjectStarsTypeLevelUpdatedBest for
SeleniumBase (this)13.2kLibraryintermediate8 days agoPython developers writing automated browser tests for websites
cypress51kDev toolbeginner4 days agoDevelopers who want automated browser tests for a web application
nightwatch12kLibraryintermediate5 months agoJavaScript or Node.js teams who want end-to-end browser tests
CloakBrowser32.7kLibrarybeginner4 days agoPython or JavaScript developers already using Playwright who need automation to get past bot checks
chromeless13.2kLibraryintermediate8.0 years agoDevelopers maintaining existing projects that already use Chromeless
Scrapegraph-ai32.4kLibraryintermediate1 months agoDevelopers who want to extract structured data from web pages using a plain-language prompt

Stats synced from GitHub. The assessment above was drafted with AI from the project's README on 2026-10-29 and may miss recent changes — check the README before relying on a command. MIT licence: free to use, modify and distribute, including commercially, as long as you keep the copyright notice.