mozilla

Revision 356363 of Mozrunner

  • Revision slug: Mozrunner
  • Revision title: Mozrunner
  • Revision id: 356363
  • Created:
  • Creator: jhammel
  • Is current revision? No
  • Comment

Revision Content

This documentation is no longer maintained.  For more information about mozrunner as part of the mozbase project, please see the mozbase project page.

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()

Revision Source

<div class="warning">
  <p>This documentation is no longer maintained.&nbsp; For more information about mozrunner as part of the mozbase project, please see the <a href="https://wiki.mozilla.org/Auto-tools/Projects/Mozbase" title="https://wiki.mozilla.org/Auto-tools/Projects/Mozbase">mozbase project page</a>.</p>
</div>
<p><a class="link-https" href="https://github.com/mozilla/mozbase/tree/master/mozrunner">mozrunner</a> is a <a class="external" href="http://pypi.python.org/pypi/mozrunner">python package</a> which handles running of Mozilla applications. mozrunner utilizes <a href="/en/Mozprofile">mozprofile</a> for managing application profiles and <a href="/en/Mozprocess">mozprocess</a> for robust process control.</p>
<p>mozrunner may be used from the command line or programmatically as an API.</p>
<h1 id="Command_Line_Usage">Command Line Usage</h1>
<p>The <code>mozrunner</code> command will launch the application (specified by <code>--app</code>) from a binary specified with <code>-b</code> or as located on the <code>PATH</code>.</p>
<p>mozrunner takes the command line options from <a href="/en/Mozprofile">mozprofile</a> for constructing the profile to be used by the application.</p>
<p>Run <code>mozrunner --help</code> for detailed information on the command line program.</p>
<h1 id="API_Usage">API Usage</h1>
<p>mozrunner features a base class, <a class="link-https" href="https://github.com/mozilla/mozbase/blob/master/mozrunner/mozrunner/runner.py">mozrunner.runner.Runner</a> which is an integration layer API for interfacing with Mozilla applications.</p>
<p>mozrunner also exposes two application specific classes, <code>FirefoxRunner</code> and <code>ThunderbirdRunner</code> which record the binary names necessary for the <code>Runner</code> class to find them on the system.</p>
<p>Example API usage:</p>
<pre>
<code>from mozrunner import FirefoxRunner

# start Firefox on a new profile
runner = FirefoxRunner()
runner.start()
</code></pre>
Revert to this revision