skillfed

seleniumbase

SeleniumBase is a framework for web crawling, scraping, and testing. Supports pytest. CDP Mode adds stealth. Includes many tools.

seleniumbase v4.51.12 3.1M downloads/30d#2,761 on PyPI12,925
Permissive license MIT Active released

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 seleniumbase

uv

uv add seleniumbase

poetry

poetry add seleniumbase

Installing 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

Development Status :: 5 - Production/StableEnvironment :: ConsoleEnvironment :: MacOS XEnvironment :: Web EnvironmentEnvironment :: Win32 (MS Windows)Framework :: PytestIntended Audience :: DevelopersIntended Audience :: Information TechnologyOperating System :: MacOS :: MacOS XOperating System :: Microsoft :: WindowsOperating System :: POSIX :: LinuxProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.15Programming Language :: Python :: 3.9Topic :: InternetTopic :: Internet :: WWW/HTTP :: BrowsersTopic :: Scientific/EngineeringTopic :: Scientific/Engineering :: Artificial IntelligenceTopic :: Scientific/Engineering :: Image ProcessingTopic :: Scientific/Engineering :: VisualizationTopic :: Software DevelopmentTopic :: Software Development :: Code GeneratorsTopic :: Software Development :: LibrariesTopic :: Software Development :: Libraries :: Application FrameworksTopic :: Software Development :: Libraries :: Python ModulesTopic :: Software Development :: Quality AssuranceTopic :: Software Development :: TestingTopic :: Software Development :: Testing :: AcceptanceTopic :: Software Development :: Testing :: Traffic GenerationTopic :: Utilities

Tags

browser automation testing frameworkselenium pytest wrapperweb scraping with stealthbot detection bypassCDP mode chromium automationend-to-end testing frameworkheadless browser testing
browser-automationbot-detection-bypassweb-scraping

More Software Development packages