CheckOps home

Tools directory

S

CheckOps

SeleniumBase

SeleniumBase is an MIT-licensed Python framework for browser automation and end-to-end testing, built on Selenium and pytest, with a CDP mode, a recorder, dashboards and optional Playwright integration.

Visit website

Latest public signals

Not refreshed yet. Refresh reads the public site and, when the entry has a GitHub repository, the latest release.

Visit Website

Introduction

SeleniumBase describes itself as an all-in-one browser automation framework for web crawling, testing and scraping. For testing, it wraps Selenium WebDriver in a pytest plugin and a BaseCase class, so tests get a browser fixture, smart waiting, assertions, screenshots and reports without hand-written setup code.

Tests are plain Python. You subclass BaseCase or use the sb pytest fixture, then call methods such as self.open(), self.type(), self.click() and self.assert_text(). Each method waits for the element to be ready before acting, which removes much of the explicit waiting that makes raw Selenium tests flaky. The project’s examples folder has end-to-end tests that run with pytest, and other scripts that run directly with python.

Beyond classic WebDriver, SeleniumBase has a CDP Mode that drives Chromium through the Chrome DevTools Protocol, and a ‘Stealthy Playwright Mode’ that extends the same approach to Playwright. The README presents these mainly as ways to avoid bot detection. For testing your own application, the more relevant parts are the recorder, which turns browser actions into test code, and the dashboards and HTML reports that summarise runs.

The framework also includes tools that are not common in other runners: a ‘Demo Mode’ that highlights each action for presentations, the ability to turn tests into guided tours, chart and presentation generators, and a large set of command-line options for choosing browsers, headless mode, proxies, user agents and parallel runs with pytest-xdist.

SeleniumBase sits at the end-to-end stage of the quality loop for Python teams. It suits teams who want to stay with pytest and Selenium but need a lot more convenience, and who are comfortable with a large framework that does many things beyond testing.

The source code is at seleniumbase/SeleniumBase on GitHub under the MIT licence, with about 13,200 stars; the most recent commit was on 6 November 2026.

Features

  1. pytest integration: Runs as a pytest plugin with an sb fixture and a BaseCase class, so all pytest features and plugins remain available.
  2. Smart waiting: Actions and assertions wait for elements automatically before acting.
  3. Recorder: Record actions in the browser and export them as SeleniumBase test code.
  4. CDP Mode: Drive Chromium directly through the DevTools Protocol for cases where WebDriver is limited.
  5. Playwright integration: Optional use of Playwright alongside SeleniumBase’s API.
  6. Dashboards and reports: Live dashboard and HTML reports with screenshots for failed tests.
  7. Demo Mode: Slows down and highlights each step, useful for demos and debugging.
  8. Rich CLI options: Flags for browser choice, headless, proxy, mobile emulation, user agent and parallel runs.
  9. Multiple syntax formats: BaseCase classes, the sb fixture, context managers and raw driver formats.
  10. Visual checks: A built-in check_window() method compares page layouts against a saved baseline.

Pros

  1. Batteries included: Most things a Python UI test suite needs are already in one package.
  2. Familiar foundation: Selenium and pytest knowledge transfers directly.
  3. Free to use: Open source under the MIT licence, so the core tool costs nothing to use.
  4. Actively maintained: The repository had commits as recent as 6 November 2026.
  5. Community: About 13,200 GitHub stars.

Cons

  1. Large surface area: Many modes and options make the framework heavy to learn fully.
  2. Scraping focus: Much of the documentation and recent work targets stealth crawling, which is not relevant to most test teams.
  3. Python only: Other language stacks need a different tool.
  4. Abstraction lock-in: Tests written with SeleniumBase methods are not portable to plain Selenium without changes.

Install and create a test:

pip install seleniumbase
# test_login.py
from seleniumbase import BaseCase
BaseCase.main(__name__, __file__)

class LoginTest(BaseCase):
    def test_login(self):
        self.open("https://example.com/login")
        self.type("#email", "user@example.com")
        self.type("#password", "secret\n")
        self.assert_text("Welcome", "h1")

Run it with pytest, headless and in parallel:

pytest test_login.py --headless -n 4 --dashboard

Practical tips:

  1. Use --demo while writing a test to see each step highlighted.
  2. Use the recorder (sbase recorder) to draft tests, then clean up selectors by hand.
  3. Keep the HTML report and screenshots as CI artifacts.

Resources:

Pricing

SeleniumBase is free and open source under the MIT licence.

  1. Python teams already on pytest and Selenium who want more built-in convenience.
  2. QA engineers who like recording tests and then editing the generated code.
  3. Teams that demo tests to stakeholders, thanks to Demo Mode and tours.
  4. Not a fit if you want a small, focused library or a non-Python stack.

Conclusion

SeleniumBase is a feature-rich, very actively maintained framework that makes Selenium testing in Python much more productive. Its pytest integration, smart waits and reporting cover most of what a UI suite needs.

Its breadth is both its strength and its cost. Teams that adopt it should pick the subset of features they need, and keep in mind that a large part of the project now targets stealth automation rather than testing.

On CheckOps, SeleniumBase is filed under the End-to-end & functional stage. Related tools listed here include Selenium, pytest, Playwright, Helium, Robot Framework Browser and CodeceptJS. Before choosing, compare them on licence, supported languages and platforms, hosting model, and how well each fits your existing CI pipeline. Facts on this page were checked against the official website, documentation and repository on 11 November 2026; statements the vendor makes about its own product are marked as vendor claims.

Alternatives

Other tools on CheckOps that cover similar ground. Open a page, or compare one with SeleniumBase side by side.