Getting Started
System Requirements¶
There are four primary requirements to use Appium Geckodriver:
- macOS, Windows or Linux host machine
- Appium
- Gecko-based web browser (desktop or Android), or an Android hybrid application with a Gecko-based webview
geckodriverbinary accessible from the host machine PATH- The binary can be downloaded and set up using the built-in
install-geckodriverdriver script, or manually downloaded from thegeckodriverGitHub releases page. macOS users may need to runxattr -cr "<binary_path>"to avoid notarization issues.
- The binary can be downloaded and set up using the built-in
If targeting a Gecko-based browser on Android, additional requirements apply - refer to the Android Devices guide for more details.
Note
If you already have the driver installed, you can also verify its requirements with the built-in Appium Doctor support:
Appium Server¶
Make sure to install a version of Appium that supports your target driver version. The requirements and prerequisites of Appium itself can be found in the Appium documentation.
| Geckodriver version | Supported Appium server version |
|---|---|
| >= 4.0.0 | Appium 4 |
| 2.0.0 - 3.0.18 | Appium 3 |
| 1.0.0 - 1.4.4 | Appium 2 |
Installation¶
Provided you have set up the above prerequisites, you can install the driver using Appium's extension CLI:
You can also specify an exact driver version:
Alternatively, if you are running a Node.js project, you can include appium-geckodriver as
one of your project dependencies. Refer to the Appium documentation
for more information about this approach.
Verify the Installation¶
In order to check that the driver was installed correctly, simply launch the Appium server:
The server log output should include a line like the following:
Creating a Session¶
Appium Geckodriver, like all Appium drivers, requires providing specific capabilities in order to start a new session. The following example lists the minimum required capabilities for a basic session:
// This will launch Firefox on a macOS host machine and attach to it
// "platformName" can be "mac", "windows", or "linux"
{
"platformName": "mac",
"appium:automationName": "gecko",
}
If testing on an Android device, additional capabilities are required - refer to the Android Devices guide.
See the Capabilities reference page for more information on the capabilities supported by the driver.