# SeleniumBase

> Python framework for browser automation, web scraping, and end-to-end testing with stealth UC and CDP modes.

SeleniumBase is an open-source Python framework from Michael Mintz and the seleniumbase organization that combines browser automation, web scraping, and end-to-end testing. It builds on Selenium/WebDriver APIs, adds test-runner integration with pytest, pynose, and behave, and includes stealth options for avoiding bot detection. The latest listed release is v4.56.1, and the project is MIT licensed.

## What It Is

SeleniumBase is a Python library and command-line toolkit for driving Chromium-based browsers (and Firefox and Safari for tests) from scripts or test suites. Methods such as type, click, and assert wait automatically for elements and often bundle several WebDriver actions into one call. Scripts can be written with the BaseCase class, the SB context manager, the Driver manager, or Pure CDP Mode (sb_cdp), and run with pytest, pynose, behave, or plain Python.

## Stealth and Scraping Modes

UC Mode and the newer CDP Mode are described as making automation undetectable to anti-bot services. CDP Mode can also add stealth to stock Playwright. The sb.solve_captcha() method handles CAPTCHAs that are not bypassed automatically, and examples cover Cloudflare Turnstile pages and scraping listings with find_elements. Proxy servers (including authenticated, SOCKS4, and SOCKS5), custom user agents, and a choice of Chromium browsers (Chrome, Chromium, Chrome-for-Testing, Edge, Brave) are configurable from the command line.

## Testing Workflow and Reporting

The pytest plugin adds many options for browser choice, headless or headed runs, Demo Mode that highlights actions, session reuse, and debugging with pdb. Failing tests save logs and screenshots, and a --dashboard option generates a live dashboard that can become an HTML report. JUnit XML, pytest-html, pynose, behave, and Allure reports are supported. Extras include a Recorder/Test Generator, SeleniumBase Commander GUI, CasePlans test case management, MasterQA, tour and presentation makers, ChartMaker, and visual testing.

## Setup and Integrations

Install with pip install seleniumbase; the seleniumbase or sbase console command provides driver downloads, project scaffolding (sbase mkdir), recorder, and Selenium Grid helpers. Webdrivers are downloaded automatically as needed. Documented integrations cover GitHub Actions, Jenkins, Azure Pipelines, Google Cloud, AWS S3 logging, MySQL result storage, Docker, and Selenium Grid. An MCP servers folder is also referenced.

## Features
- UC Mode and CDP Mode stealth automation
- Stealth layer for Playwright
- CAPTCHA handling via solve_captcha
- Automatic waiting and driver management
- pytest, pynose, and behave integration
- Recorder / test generator
- Demo Mode and debugging options
- Dashboard and HTML/JUnit/Allure reports
- CasePlans test case management
- MasterQA manual/automation hybrid
- Proxy and user-agent configuration
- Selenium Grid and CI/CD support
- Visual testing
- Tour, presentation, and chart makers

## Integrations
pytest, pynose, behave, Selenium Grid, Playwright, GitHub Actions, Jenkins, Azure Pipelines, Google Cloud, AWS S3, MySQL, Docker, Allure

## Platforms
WINDOWS, MACOS, LINUX, WEB, API, DEVELOPER_SDK, CLI

## Pricing
Open Source

## Version
4.56.1

## Links
- Website: https://seleniumbase.io
- Documentation: https://seleniumbase.io/help_docs/features_list/
- Repository: https://github.com/seleniumbase/SeleniumBase
- EveryDev.ai: https://www.everydev.ai/tools/seleniumbase
