{"id":27940,"library":"marionette-harness","title":"Marionette Harness","description":"Marionette Harness is a Python test automation framework for Firefox's Marionette protocol, used for Gecko-based browser automation. The current version is 5.0.0, released with support for Python 3 and asynchronous test execution. Release cadence is irregular, tied to Firefox releases.","status":"active","version":"5.0.0","language":"python","source_language":"en","source_url":"https://github.com/mozilla/marionette","tags":["firefox","marionette","automation","testing","webdriver"],"install":[{"cmd":"pip install marionette-harness","lang":"bash","label":"Install from PyPI"},{"cmd":"pip install 'marionette-harness[geckodriver]'","lang":"bash","label":"Install with geckodriver dependency"}],"dependencies":[{"reason":"Required for managing Firefox binary and remote control","package":"geckodriver","optional":true},{"reason":"Used for launching Firefox instances","package":"mozrunner","optional":false},{"reason":"Used for creating Firefox profiles","package":"mozprofile","optional":false},{"reason":"Used for Python 2/3 compatibility (deprecated in newer versions)","package":"six","optional":false}],"imports":[{"note":"Marionette driver is a separate package marionette_driver, not marionette","wrong":"from marionette import Marionette","symbol":"Marionette","correct":"from marionette_driver import Marionette"},{"note":"","wrong":null,"symbol":"MarionetteTestCase","correct":"from marionette_harness import MarionetteTestCase"},{"note":"","wrong":null,"symbol":"MarionetteHarness","correct":"from marionette_harness import MarionetteHarness"},{"note":"Top-level 'marionette' package does not exist; the harness is marionette_harness","wrong":"import marionette","symbol":"marionette","correct":"import marionette_harness.runner as runner"}],"quickstart":{"code":"from marionette_driver import Marionette\nfrom marionette_harness import MarionetteTestCase\n\nclass TestBasic(MarionetteTestCase):\n    def test_navigate(self):\n        self.marionette.navigate('https://example.com')\n        self.assertIn('Example', self.marionette.title)\n\nif __name__ == '__main__':\n    from marionette_harness import MarionetteHarness\n    MarionetteHarness().run_tests()","lang":"python","description":"Basic test using MarionetteTestCase. Requires Firefox with Marionette enabled (--marionette flag)."},"warnings":[{"fix":"Ensure your installation uses 'marionette-harness' and imports from 'marionette_harness'.","message":"In version 5.0.0, the package was renamed from 'marionette' to 'marionette-harness' on PyPI. Old import paths (e.g., 'from marionette import ...') no longer work.","severity":"breaking","affected_versions":">=5.0.0"},{"fix":"Upgrade to Python 3 environment.","message":"Python 2 support is dropped; the harness now requires Python 3.6+.","severity":"deprecated","affected_versions":">=5.0.0"},{"fix":"Install marionette_driver: pip install marionette-driver, or use the optional dependency.","message":"The marionette-driver package (imported via 'from marionette_driver import Marionette') is a separate dependency and must be installed explicitly or via marionette-harness[geckodriver].","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-09T00:00:00.000Z","next_check":"2026-08-07T00:00:00.000Z","problems":[{"fix":"Use 'from marionette_harness import ...' instead.","cause":"Trying to import the old 'marionette' package instead of 'marionette_harness'.","error":"ModuleNotFoundError: No module named 'marionette'"},{"fix":"Install marionette-driver and import from 'marionette_driver'.","cause":"Marionette client class is in the separate 'marionette_driver' package, not in 'marionette_harness'.","error":"ImportError: cannot import name 'Marionette' from 'marionette_harness'"},{"fix":"Launch Firefox with --marionette flag or ensure geckodriver is installed and in PATH.","cause":"Firefox is not launched with Marionette enabled (--marionette flag) or geckodriver is missing.","error":"Error: The browser is not responding. The connection to Marionette server is lost."}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}