--- id: pytest-selenium version: "4.1.0" license: unclear license_treatment: copyleft maintenance: active --- # pytest-selenium — pytest plugin for Selenium License: copyleft · Maintenance: active · Downloads: 504.5K/mo ## What it is and what it does pytest-selenium bridges pytest and Selenium WebDriver, allowing you to write browser-based UI tests using pytest's fixture and parametrization system. It depends on pytest, selenium, requests, tenacity, and several pytest plugins (pytest-html, pytest-variables, pytest-base-url) to provide a cohesive testing environment. The plugin handles the plumbing of WebDriver lifecycle and test reporting, so you focus on test logic rather than browser setup. The package is designed for teams running web automation tests at scale—it supports Python 3.8 through 3.12 and works on macOS, Windows, and POSIX systems. With active maintenance since 2015 and a recent commit on 2026-05-25, it is a mature choice in the pytest ecosystem for UI testing, though you will still need to manage WebDriver binaries and browser compatibility separately. Use it for: - Write cross-browser UI tests for web applications using pytest's familiar syntax and fixtures. - Integrate browser-based tests into CI/CD pipelines with pytest's reporting and plugin ecosystem. - Automate regression testing of web interfaces across multiple browsers and operating systems. - Combine Selenium tests with unit tests in a single pytest suite for end-to-end validation. - Leverage pytest parametrization to run the same UI test against different browsers or data sets. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. pytest-selenium is a pytest plugin that integrates Selenium WebDriver into pytest test suites, enabling browser automation and web UI testing within the pytest framework. Yes, if you are building browser automation tests and want to use pytest. The plugin is stable, actively maintained, has low install friction, and integrates cleanly with pytest's ecosystem. The MPL 2.0 copyleft license is a consideration for proprietary codebases. No known vulnerabilities. ## Install pip install pytest-selenium uv add pytest-selenium poetry add pytest-selenium ## Installing pytest-selenium Before you install: Low install friction with a pure-wheel distribution. The package is actively maintained (last commit 2026-05-25) and marked Production/Stable, with support across Python 3.8, 3.9, 3.10, 3.11, and 3.12 on CPython and PyPy. License in practice: Licensed under Mozilla Public License 2.0 (MPL 2.0), a copyleft license. This requires derivative works to be distributed under the same license and disclose source code changes, which may constrain proprietary use. Quickstart: pip install pytest-selenium import pytest from selenium import webdriver # Use pytest fixtures provided by the plugin def test_example(selenium): selenium.get('http://example.com') assert 'Example' in selenium.title Requires Selenium WebDriver and a compatible browser driver (e.g., chromedriver, geckodriver) installed and in PATH or configured via environment. Verify before relying: - Whether the plugin provides built-in fixtures for common browser setup/teardown patterns beyond what Selenium itself offers. - Support for parallel test execution and how it interacts with browser driver management. - Integration capabilities with cloud providers like BrowserStack or Sauce Labs (mentioned in keywords but not detailed in excerpt). ## Package facts - License: not declared (copyleft) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 504.5K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags selenium pytest plugin, browser automation testing, web ui test framework, selenium webdriver pytest, automated browser testing, cross-browser test automation, selenium test fixtures, browser-automation, ui-testing, selenium-integration [View on SkillFed](https://skillfed.io/packages/pytest-selenium) · [View on PyPI](https://pypi.org/project/pytest-selenium/)