Welcome to mirror list, hosted at ThFree Co, Russian Federation.

README.md - github.com/mozilla/geckodriver.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 06226f7de3464623491a93ea35fbd3f537c3be5d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
# geckodriver [![Build Status](https://travis-ci.org/mozilla/geckodriver.svg?branch=master)](https://travis-ci.org/mozilla/geckodriver)

Proxy for using W3C WebDriver-compatible clients
to interact with Gecko-based browsers.

This program provides the HTTP API described by
the [WebDriver protocol](http://w3c.github.io/webdriver/webdriver-spec.html#protocol)
to communicate with Gecko browsers, such as Firefox.
It translates calls into
the [Marionette](https://developer.mozilla.org/en-US/docs/Mozilla/QA/Marionette)
automation protocol
by acting as a proxy between the local- and remote ends.

You can consult the [change log](https://github.com/mozilla/geckodriver/blob/master/CHANGES.md)
for a record of all notable changes to the program.

## Supported Firefoxen

Marionette and geckodriver are not yet feature complete.
This means it does not yet offer full conformance
with the [WebDriver standard](https://w3c.github.io/webdriver/webdriver-spec.html)
or complete compatibility with [Selenium](http://www.seleniumhq.org/).

You can track the [implementation status](https://developer.mozilla.org/en-US/docs/Mozilla/QA/Marionette/WebDriver/status)
of the latest Firefox Nightly on MDN.
We also keep track of known
[Marionette](https://github.com/mozilla/geckodriver/issues?q=is%3Aissue+is%3Aopen+label%3Amarionette),
[Selenium](https://github.com/mozilla/geckodriver/issues?q=is%3Aissue+is%3Aopen+label%3Aselenium),
and [specification](https://github.com/mozilla/geckodriver/issues?q=is%3Aissue+is%3Aopen+label%3Aspec)
problems in our issue tracker.

Marionette support is best in Firefox 48 and onwards,
although the more recent the Firefox version,
the more bug fixes and features.
**Firefox 47 is explicitly not supported.**

## Firefox capabilities

geckodriver supports a capability named `moz:firefoxOptions` which takes
Firefox-specific preference values. This must be a dictionary and may
contain any of the following fields:

<table>
    <thead>
        <tr>
            <th>Name
            <th>Type
            <th>Default
            <th>Description
        </tr>
    </thead>
    <tr>
        <td><code>binary</code>
        <td><code>string</code>
        <td>Taken from <code>-b</code> argument
          or system default location
        <td>Absolute path of the Firefox binary,
    e.g. <code>/usr/bin/firefox</code> or <code>/Applications/Firefox.app/Contents/MacOS/firefox</code>,
    to select which custom browser binary to use.
    If left undefined geckodriver will attempt
    to deduce the default location of Firefox
    on the current system.
    <tr>
        <td><code>args</code>
        <td><code>Array.&ltstring&gt;</code>
        <td>
        <td>Command line arguments to pass to the Firefox binary.
          These must include the leading <code>--</code> where required
          e.g. <code>["--devtools"]</code>.
    </tr>
    <tr>
        <td><code>profile</code>
        <td><code>string</code>
        <td>New, empty profile
        <td>Base64-encoded zip of a profile directory
          to use as the profile for the Firefox instance.
          This may be used to e.g. install extensions or custom certificates.
    </tr>
    <tr>
        <td><code>log</code>
        <td><a href=#log-options>Log options</a> object
        <td>
        <td>Logging options for Gecko.
    </tr>
    <tr>
        <td><code>prefs</code>
        <td><code>Object&lt;string,&nbsp;(string|boolean|integer)&gt</code>
        <td>
        <td>Map of preference name to preference value, which can be a
            string, a boolean or an integer.
    </tr>
</table>

### Log options

<table>
 <thead>
  <tr>
   <th>Name
   <th>Type
   <th>Default
   <th>Description
  </tr>
 </thead>

 <tr>
  <td><code>level</code>
  <td>String
  <td><code>info</code> with optimised Firefox builds,
   and <code>debug</code> with non-optimised
  <td>Set the level of verbosity in Gecko.
   Available levels are <code>trace</code>,
   <code>debug</code>, <code>config</code>,
   <code>info</code>, <code>warn</code>,
   <code>error</code>, and <code>fatal</code>.
 </tr>
</table>

## Building

geckodriver is written in [Rust](https://www.rust-lang.org/)
and you need the [Rust toolchain](https://rustup.rs/) to compile it.

To build the project for release,
ensure you do a compilation with optimisations:

    % cargo build --release

Or if you want a non-optimised binary for debugging:

    % cargo build

## Usage

Usage steps are [documented on MDN](https://developer.mozilla.org/en-US/docs/Mozilla/QA/Marionette/WebDriver),
but the gist of it is this:

    % geckodriver -b /usr/bin/firefox

Or if you’re on Mac:

    % geckodriver -b /Applications/FirefoxNightly.app/Contents/MacOS/firefox-bin