mozrunner
Reliable start/stop/configuration of Mozilla Applications (Firefox, Thunderbird, etc.)
What it is and what it does
Mozrunner is a Python library for programmatic control of Mozilla applications. It abstracts the complexity of launching, configuring, and managing Firefox, Thunderbird, and other Mozilla tools as subprocesses, handling process lifecycle, profile management, and configuration injection. It's part of the larger Mozilla Mozbase toolkit and is commonly used in automated testing, CI/CD pipelines, and browser automation scenarios where you need reliable, repeatable control over application startup and shutdown.
The package depends on six Mozilla libraries (mozdevice, mozfile, mozinfo, mozlog, mozprocess, mozprofile) that handle complementary concerns like device interaction, file operations, system introspection, logging, and profile management. It supports Python 3.8 through 3.13 and carries no known security vulnerabilities. The copyleft license (MPL 2.0) means any modifications you make must be released under the same license, though using the unmodified package in proprietary code is permitted.
Use it for:
- Automated browser testing: launch Firefox with specific profiles and configurations for test suites
- CI/CD integration: reliably start and stop Firefox instances in build pipelines
- Process lifecycle control: manage Firefox startup, shutdown, and configuration injection programmatically
- Multi-instance testing: manage multiple concurrent Firefox processes with isolated profiles
- Browser compatibility testing: start different Firefox versions with consistent configuration
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Mozrunner manages the lifecycle of Mozilla applications (Firefox, Thunderbird, etc.) — starting, stopping, and configuring them programmatically for testing and automation.
Yes, if you need to automate Mozilla application control in testing or CI/CD. Low install friction, active maintenance, no known vulnerabilities, and broad Python version support (3.8–3.13) make it a safe choice. The copyleft license is standard for Mozilla projects and poses no barrier to most use cases. Verify that your target Firefox/Thunderbird versions are compatible and that your deployment environment can support the package's Mozilla dependencies.
Install
mozrunner on PyPI
pip
pip install mozrunneruv
uv add mozrunnerpoetry
poetry add mozrunnerInstalling mozrunner
Before you install
Low friction to install; distributed as a pure-Python wheel. Actively maintained with recent release. Depends on six Mozilla packages (mozdevice, mozfile, mozinfo, mozlog, mozprocess, mozprofile) that handle complementary concerns.
License in practice
Licensed under Mozilla Public License 2.0 (copyleft). Derivative works and modifications must be released under MPL 2.0; proprietary use of unmodified binaries is permitted, but source changes require reciprocal licensing.
Quickstart
pip install mozrunner
from mozrunner import FirefoxRunner
runner = FirefoxRunner()
runner.start()
runner.stop()
Requires Python 3.8 or later; target Mozilla application must be installed on the system.
Verify before relying
- Whether mozrunner requires Firefox or other Mozilla applications to be pre-installed on the system
- Whether it supports headless browser operation or requires a display
- Specific version compatibility constraints with Firefox/Thunderbird versions
Package facts
| License | MPL 2.0 (copyleft) |
| Python support | supports the current Python release (>=3.8) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 6 — mozdevice, mozfile, mozinfo, mozlog, mozprocess, mozprofile |
| Maintenance | actively maintained — 141 days since the last release |
| First released | |
| Downloads | 246,275/month — #8,714 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: mozrunner-8.4.0-py2.py3-none-any.whl
Keywords: mozilla
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
dockerflowProvides helpers and tools for implementing…
copyleft · top 15,000 on PyPI
mozdebugProvides utilities for launching and managing…
copyleft · top 15,000 on PyPI
mozdeviceManages and controls connected mobile devices…
copyleft · top 15,000 on PyPI
mozprofileCreates and modifies Mozilla application…
copyleft · top 15,000 on PyPI
honchoHoncho runs and manages multiple processes…
permissive · top 5,000 on PyPI
fuzzfetchFuzzfetch retrieves Firefox, Spidermonkey, and…
copyleft · top 15,000 on PyPI
mozprocessProvides utilities for spawning, managing, and…
copyleft · top 15,000 on PyPI
mozinfoProvides system information detection for…
copyleft · top 15,000 on PyPI
mozfileProvides file and directory utilities for…
copyleft · top 15,000 on PyPI
mozilla-versionParse and validate Mozilla product version…
copyleft · top 15,000 on PyPI