gecko-dev/testing/mozbase/mozrunner
Jeff Hammel c8ee2a64e2 Bug 802242 - mirror mozbase -> m-c for week of Oct 16 @ aa50f7cf0f ; r=wlach 2012-10-17 09:44:50 -07:00
..
mozrunner Bug 790018 - bump version of manifestdestiny and mirror to m-c;r=mcote 2012-09-11 19:46:39 -07:00
README.md Bug 769808 - Update mozbase on m-c to include fix for bug 769789. r=jhammel 2012-07-03 01:52:54 +05:30
setup.py Bug 802242 - mirror mozbase -> m-c for week of Oct 16 @ aa50f7cf0f ; r=wlach 2012-10-17 09:44:50 -07:00

README.md

mozrunner is a python package which handles running of Mozilla applications. mozrunner utilizes mozprofile for managing application profiles and mozprocess for robust process control.

mozrunner may be used from the command line or programmatically as an API.

Command Line Usage

The mozrunner command will launch the application (specified by --app) from a binary specified with -b or as located on the PATH.

mozrunner takes the command line options from mozprofile for constructing the profile to be used by the application.

Run mozrunner --help for detailed information on the command line program.

API Usage

mozrunner features a base class, mozrunner.runner.Runner which is an integration layer API for interfacing with Mozilla applications.

mozrunner also exposes two application specific classes, FirefoxRunner and ThunderbirdRunner which record the binary names necessary for the Runner class to find them on the system.

Example API usage:

from mozrunner import FirefoxRunner

# start Firefox on a new profile
runner = FirefoxRunner()
runner.start()

See also a comparable implementation for selenium: http://code.google.com/p/selenium/source/browse/trunk/py/selenium/webdriver/firefox/firefox_binary.py