Firefox Profile Service

You want to run your Firefox browser with a specific extension or need to set couple preferences? Selenium allows you to use a profile for the Firefox browser by passing this profile as base64 string to the firefox_profile property in your desired capabilities. This requires to build that profile and convert it into base64. This service for the wdio testrunner takes the work of compiling the profile out of your hand and let's you define your desired options comfortable from the wdio.conf.js file.

To find all possible options just open about:config in your Firefox browser or go to mozillaZine website to find the whole documentation about each setting. In Addition to that you can define compiled (as ``) Firefox extensions that should get installed before the test starts.

Installation

The easiest way is to keep as a devDependency in your.

You can simple do it by:

Instructions on how to install `` can be found here.

Configuration

Setup your profile by adding the service to your service list. Then define your settings in the property like this:

If you have built a custom Firefox extension that you want to install in the browser make sure to set `` as profile flag since Firefox extensions are required to be signed by Mozilla.

To use custom unsigned extensions you will also need to use Firefox Developer Edition since the regular Firefox 48 and newer do not allow this.

Options

Contains all settings as key value pair. You can find all available settings on the `` page.

extensions

Add one or multiple extensions to the browser session. All entries can be either an absolute path to the `` file or the path to an unpacked Firefox extension directory.

Type: Default:

profileDirectory

Create Firefox profile based on an existing one by setting an absolute path to that profile.

Type: Default:

proxy

Set network proxy settings. The parameter is a hash which structure depends on the value of mandatory key, which takes one of the following string values:

  • `` - direct connection (no proxy)
  • `` - use operating system proxy settings
  • - use automatic proxy configuration set based on the value of key
  • - manual proxy settings defined separately for different protocols using values from following keys:, , , ``

Type: Default: Example:

  • Automatic Proxy:
```
  • Manual HTTP Proxy:
```
  • Manual HTTP and HTTPS Proxy:
```

legacy

Please set this flag to `` if you use Firefox v55 or lower.

Type: Default:


For more information on WebdriverIO see the homepage.