seleniumbase
SeleniumBase is a framework for web crawling, scraping, and testing. Supports pytest. CDP Mode adds stealth. Includes many tools.
What it is and what it does
SeleniumBase is a Python framework built on Selenium WebDriver that simplifies browser automation for testing, web scraping, and crawling. It integrates with pytest and other test runners to provide structured test execution, command-line configuration, and a higher-level API than raw Selenium. The framework includes CDP (Chrome DevTools Protocol) mode, which bypasses bot-detection systems by using Chromium directly, and Stealthy Playwright mode, which extends that stealth to Playwright-based scripts.
The package handles common automation tasks—navigation, element selection, form filling, assertions, screenshot capture, PDF export, and CAPTCHA solving—through a simplified method interface. It supports multiple Chromium-based browsers (Chrome, Chromium, Edge, Brave) and provides tools for demo mode (slowed execution with visual highlights), dashboard reporting, and locale configuration. With 60 runtime dependencies, it bundles substantial functionality but requires careful consideration of your actual use case to avoid unnecessary bloat.
Use it for:
- End-to-end testing of web applications with pytest, including multi-step workflows like login, cart checkout, and form submission
- Web scraping and data extraction from JavaScript-heavy sites that require a real browser and bot-detection bypass
- Automated testing of sites protected by Cloudflare, bot-detection systems, or CAPTCHA challenges using CDP mode
- Generating test reports, screenshots, and PDFs from automated browser sessions for documentation and debugging
- Headless browser automation in CI/CD pipelines with command-line control over browser selection and test execution
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
SeleniumBase is a browser automation framework that combines Selenium WebDriver with pytest integration, CDP mode for bot-detection bypass, and tools for web testing, scraping, and crawling.
Yes, if you need a comprehensive browser automation framework with bot-detection bypass and pytest integration. The low install friction, active maintenance, permissive license, and zero known vulnerabilities make it a solid choice. However, the 60 runtime dependencies are substantial—evaluate whether you need the full feature set or if a lighter alternative suits your use case. Ideal for teams building test suites or scraping sites that require stealth; less suitable for simple one-off scripts.
Install
seleniumbase on PyPI
pip
pip install seleniumbaseuv
uv add seleniumbasepoetry
poetry add seleniumbaseInstalling seleniumbase
Before you install
Low install friction with a wheel distribution. Active maintenance—released 4 days ago with 12925 GitHub stars. Supports Python 3.9 through 3.15. Carries 60 runtime dependencies, which is substantial but typical for a full-featured automation framework.
License in practice
MIT license permits commercial and private use with minimal restrictions. You may use, modify, and distribute SeleniumBase freely as long as you include the license notice.
Quickstart
pip install seleniumbase
from seleniumbase import sb_cdp
sb = sb_cdp.Chrome()
sb.goto("https://example.com")
elements = sb.find_elements("a")
for element in elements:
print(element.text)
sb.quit()
Requires Python 3.9 or later. CDP mode and browser automation require a Chromium-based browser (Chrome, Chromium, Edge, or Brave); only unbranded Chromium and Chrome-for-Testing install automatically.
Verify before relying
- Whether all 60 runtime dependencies are required for basic usage or if many are optional for specific features
- Performance characteristics and resource overhead when running multiple concurrent browser sessions
- Compatibility with headless environments and CI/CD platforms beyond the general pytest/Linux/Windows/macOS support listed
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.9) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 60 — pip, packaging, setuptools, wheel, attrs, certifi, exceptiongroup, websockets, filelock, fasteners, mycdp, pynose, platformdirs, typing-extensions, sbvirtualdisplay, MarkupSafe, Jinja2, six, parse, parse-type, colorama, psutil, pyyaml, pygments, pyreadline3, tabcompleter, pdbp, idna, charset-normalizer, urllib3 |
| Maintenance | actively maintained — 4 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 3,083,496/month — #2,761 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: seleniumbase-4.51.12-py3-none-any.whl
Keywords: pytest, selenium, framework, automation, browser, testing, webdriver, seleniumbase, sbase, web-crawling, web-scraping, stealth, chromium, playwright, anti-detection, captcha-bypass, fingerprint, recaptcha, turnstile, headless
Tags
More Software Development packages
Provides backported and experimental type hints…
permissive · top 100 on PyPI
numpyNumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
distlibDistlib provides low-level packaging utilities…
permissive · top 1,000 on PyPI
selenium-stealthModifies a Selenium Chrome WebDriver to evade…
permissive · top 15,000 on PyPI
pytest-seleniumpytest-selenium is a pytest plugin that…
copyleft · top 15,000 on PyPI
browsergym-coreBrowserGym provides a gymnasium environment for…
permissive · top 5,000 on PyPI
undetected-chromedriverPatches Selenium's Chrome WebDriver to avoid…
copyleft · top 5,000 on PyPI
zendriverZendriver is an async-first web automation…
agpl · top 15,000 on PyPI
splinterSplinter provides a unified Python interface…
permissive · top 15,000 on PyPI
DrissionPageDrissionPage is a Python web automation tool…
unclear · top 15,000 on PyPI
requestiumRequestium merges Requests, Selenium, and…
permissive · top 15,000 on PyPI
cloakbrowserLaunches a stealth Chromium browser that evades…
permissive · top 15,000 on PyPI
pytest-playwrightA pytest plugin that integrates Playwright…
permissive · top 5,000 on PyPI