SeleniumBase is an MIT-licensed Python framework that combines browser automation, end-to-end testing, web crawling, scraping, and bot-detection bypass in one package, built for QA engineers, test automation developers, and Python scraper authors.
What it is
SeleniumBase is an all-in-one browser automation framework living in the Python ecosystem. It targets the Chromium family of browsers and wraps the Selenium and pytest stacks into a single library, with an optional Playwright integration layered on top. The README describes it as covering web crawling, testing, scraping, and stealth from one install. Its distinguishing component is CDP Mode, a stealthy Chromium configuration that the project states passes every bot detection test.
The concrete problem it solves is assembly work. A Python automation project normally requires choosing and wiring a test runner, a WebDriver setup, a browser download strategy, and a separate layer of stealth patching before any script runs. SeleniumBase replaces that manual plumbing with one package that supplies the test runner, the element API, the browser provisioning, and the anti-detection layer together. Development remains active, with the repository showing 13,018 stars, 1,582 forks, and a last push of 2026-09-16.
Key capabilities
- CDP Mode through
sb_cdp.Chrome(), a stealthy Chromium configuration that the README reports passing all BrowserScan bot-detection tests.
- Stealthy Playwright Mode, where Playwright attaches to a SeleniumBase browser session via
sb.get_endpoint_url() and p.chromium.connect_over_cdp(endpoint_url); the README reports all Sannysoft bot-detection tests passing.
- Runtime selection of the underlying Chromium binary through CLI flags
--chromium, --cft, --edge, and --brave, or through method arguments such as use_chromium=True, cft=True, and browser="brave".
- A broad element interaction API covering
type, press_keys, click, set_value, select_option_by_text, hover_and_click, drag_and_drop, nested_click for iframes, highlight, and flash.
- Built-in assertion and extraction methods including
assert_element and find_elements, usable for both test verification and scraping listing pages.
- Browser session options such as
locale="en" and ad_block=True applied at driver construction.
- A wider toolset referenced in the README, including the Recorder, Dashboard, GUI, MasterQA, Tours, Charts, Farm, JS Mgr, Translator, Presenter, Visual, and CPlans.
Who uses it and how
- Test teams running end-to-end and e2e-testing suites on pytest, using
assert_element and flash to make failures visually obvious.
- Scraping and data-extraction developers pulling structured content, as in the README example that reads
span.titleline > a elements from Hacker News submissions.
- Stealth-sensitive automation work, where scripts visit sites such as browserscan.net and bot.sannysoft.com and are expected to register as normal browsers.
- Playwright users who want CDP-level stealth without abandoning their existing Playwright code, by connecting over the browser endpoint.
- Agent and tooling builders, through the separately documented
seleniumbase-mcp MCP server.
Getting started
Install the main framework with pip install seleniumbase, or use uv add. The Playwright integration is optional and installed with pip install playwright.
How it compares
The facts name Playwright, Selenium with chromedriver, and pytest as the surrounding tools, and SeleniumBase sits above them rather than beside them: it runs pytest as its test runner, drives Chromium-based browsers, and can hand a stealthy session to Playwright through a CDP endpoint. Teams already standardized on a non-Python automation stack, or unwilling to depend on the Chromium family, gain little from the stealth work that defines this project.
When to use it — and when not to
Self-hosters operate the browser binaries themselves, and the README notes that only unbranded Chromium and Chrome-for-Testing download automatically; Edge and Brave must already be present. Anyone whose target browsers fall outside the Chromium family, or whose test suite is already deeply invested in another language's tooling, should look elsewhere. The README is largely a navigation index of links, so expect the detail to live in the linked pages rather than the front page.
project readme (upstream, from github) — read inline

All-in-one Browser Automation Framework:
Web Crawling / Testing / Scraping / Stealth


🚀 Start |
🏰 Features |
🎛️ Options |
📚 Examples |
💻 Scripts |
🗾 Locale
📗 API |
📘 Stealth API |
🔠 DesignPatterns |
🔴 Recorder |
📊 Dashboard
🎖️ GUI |
📰 TestPage |
👤 UC Mode |
🐙 CDP Mode |
📶 Charts |
🖥️ Farm
👁️ How |
🚝 Migration |
🎭 Stealthy Playwright |
🛂 MasterQA |
🚎 Tours
🤖 MCP |
🟨 JS Mgr |
🌏 Translator |
🎞️ Presenter |
🖼️ Visual |
🗂️ CPlans
pip install seleniumbase for the main framework. (Or use uv add)
pip install playwright for the optional integration. (Or use uv add)
📝 Here's a Python example that uses Pure CDP Mode (sb_cdp):
(It navigates to Browserscan where it bypasses bot-detection.)
from seleniumbase import sb_cdp
sb = sb_cdp.Chrome()
sb.goto("https://browserscan.net/bot-detection")
sb.sleep(3)
sb.quit()
(All BrowserScan bot-detection tests passed successfully.)
🎭 Here's an example script that uses Stealthy Playwright Mode:
(Playwright connects to a stealthy SeleniumBase browser session.)
from playwright.sync_api import sync_playwright
from seleniumbase import sb_cdp
sb = sb_cdp.Chrome(guest=True)
endpoint_url = sb.get_endpoint_url()
with sync_playwright() as p:
browser = p.chromium.connect_over_cdp(endpoint_url)
page = browser.contexts[0].pages[0]
page.goto("https://bot.sannysoft.com/")
page.wait_for_timeout(500)
(All Sannysoft bot-detection tests passed successfully.)
📝 This example shows off multiple methods:
from seleniumbase import sb_cdp
sb = sb_cdp.Chrome()
sb.goto("https://seleniumbase.io/demo_page")
sb.type("input", "Quickly type text!")
sb.press_keys("textarea", "Slowly type text!")
sb.click("#myButton")
sb.set_value("input#mySlider", "100")
sb.click_visible_elements("input.checkBoxClassB")
sb.select_option_by_text("#mySelect", "Set to 75%")
sb.hover_and_click("#myDropdown", "#dropOption2")
sb.click("#checkBox1")
sb.drag_and_drop("img#logo", "div#drop2")
sb.nested_click("iframe#myFrame3", ".fBox")
sb.highlight("#myButton")
sb.quit()
📝
readme truncated — read the full docs on github