Registry / http-networking / marionette-driver

marionette-driver

JSON →
library3.7.0pypypi✓ verified 84d ago

A Python client for controlling Gecko-based browsers (Firefox, Firefox OS) via the Marionette protocol. Version 3.7.0, actively maintained with irregular releases.

pip install marionette-driver
INSTALL
IMPORT
SIG · MARIONETTE-DRIVER
M
marionette-driver
http-networkingpythonv3.7.0
Install
3.9s avg
Import
493ms
Disk
27MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v3.7.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.512s · 31.3MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 3.9s · import 0.474s · 32MB
27MB installed
● package 27MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Marionette
from marionette_driver.marionette import Marionette
from marionette import Marionette
The package is 'marionette_driver' (underscore), not 'marionette'
Wait
from marionette_driver.wait import Wait
Commonly used for explicit waits
By
from marionette_driver.by import By
Used to specify element location strategies

Connects to a running Firefox instance with Marionette enabled (--marionette flag) or a GeckoDriver server.

from marionette_driver.marionette import Marionette client = Marionette(host='localhost', port=2828) client.start_session() client.navigate('https://example.com') print(client.title) client.delete_session()
Debug
Known issues
breakingIn version 3.0.0, the 'Marionette' class was moved from 'marionette.marionette' to 'marionette_driver.marionette'. Old imports will fail.
fix
Use 'from marionette_driver.marionette import Marionette'
affects: >=3.0.0
deprecatedThe 'start_session' method parameters changed: 'timeout' and 'page_load_strategy' are now deprecated in favor of a capabilities dict. Using positional arguments may break in future releases.
fix
Call 'start_session(capabilities={"marionette": True})' instead.
affects: >=3.5.0
gotchaThe library expects a running Marionette server (Firefox with --marionette or geckodriver). It does not launch the browser automatically.
fix
Start Firefox with 'firefox --marionette' or use geckodriver before connecting.
affects: all
gotchaWhen using with geckodriver, the host and port must match the geckodriver's listening address (default localhost:2828).
fix
Set environment variable MARIONETTE_HOST and MARIONETTE_PORT if not default.
affects: all
Errors
Common errors & fixes
ImportError: No module named 'marionette'
Wrong import path; the package is 'marionette_driver'.
fix
Install the correct package with 'pip install marionette-driver', then import from 'marionette_driver'.
marionette_driver.errors.MarionetteException: Connection refused
No Marionette server is running on the specified host:port.
fix
Start Firefox with the --marionette flag or launch geckodriver before connecting.
AttributeError: 'Marionette' object has no attribute 'start_session'
Outdated library version (<3.0) where the API was different.
fix
Upgrade to the latest version: 'pip install --upgrade marionette-driver'
TypeError: start_session() got an unexpected keyword argument 'timeout'
Passing deprecated parameters as keyword arguments in recent versions.
fix
Use capabilities dict: 'client.start_session(capabilities={"marionette": True})'
Upgrade
Version history
3.7.0latest on PyPI · released Apr 30, 2026
Audit
Dependencies
mozrunneroptionalRequired for launching Firefox binaries in some test harnesses
sixoptionalUsed for Python 2/3 compatibility (though library now requires Python >=3.8)
Agent activity
2 hits · last 30 days
node
2
Resources
marionette-driver — pip install marionette-driver · libregistry