OLD | NEW |
(Empty) | |
| 1 [mozrunner](https://github.com/mozilla/mozbase/tree/master/mozrunner) |
| 2 is a [python package](http://pypi.python.org/pypi/mozrunner) |
| 3 which handles running of Mozilla applications. |
| 4 mozrunner utilizes [mozprofile](https://github.com/mozilla/mozbase/tree/master/m
ozprofile) |
| 5 for managing application profiles |
| 6 and [mozprocess](https://github.com/mozilla/mozbase/tree/master/mozprocess) for
robust process control. |
| 7 |
| 8 mozrunner may be used from the command line or programmatically as an API. |
| 9 |
| 10 |
| 11 # Command Line Usage |
| 12 |
| 13 The `mozrunner` command will launch the application (specified by |
| 14 `--app`) from a binary specified with `-b` or as located on the `PATH`. |
| 15 |
| 16 mozrunner takes the command line options from |
| 17 [mozprofile](https://github.com/mozilla/mozbase/tree/master/mozprofile) for cons
tructing the profile to be used by |
| 18 the application. |
| 19 |
| 20 Run `mozrunner --help` for detailed information on the command line |
| 21 program. |
| 22 |
| 23 |
| 24 # API Usage |
| 25 |
| 26 mozrunner features a base class, |
| 27 [mozrunner.runner.Runner](https://github.com/mozilla/mozbase/blob/master/mozrunn
er/mozrunner/runner.py) |
| 28 which is an integration layer API for interfacing with Mozilla applications. |
| 29 |
| 30 mozrunner also exposes two application specific classes, |
| 31 `FirefoxRunner` and `ThunderbirdRunner` which record the binary names |
| 32 necessary for the `Runner` class to find them on the system. |
| 33 |
| 34 Example API usage: |
| 35 |
| 36 from mozrunner import FirefoxRunner |
| 37 |
| 38 # start Firefox on a new profile |
| 39 runner = FirefoxRunner() |
| 40 runner.start() |
| 41 |
| 42 See also a comparable implementation for [selenium](http://seleniumhq.org/): |
| 43 http://code.google.com/p/selenium/source/browse/trunk/py/selenium/webdriver/fire
fox/firefox_binary.py |
OLD | NEW |