WebdriverIO service to start & stop GeckoDriver
npm install wdio-geckodriver-serviceThis service helps you to run GeckoDriver seamlessly when running tests with the WDIO testrunner. This service does not require a Selenium server, but uses the geckodriver NPM package that wraps the GeckoDriver for you or uses a global installed binary.
Example capabilities:
``js`
capabilities: [{
browserName: 'firefox'
}]
`bash`
npm install wdio-geckodriver-service --save-dev
By design, only Firefox is available (when installed on the host system). In order to use the service you need to add geckodriver to your service array:
`js
// wdio.conf.js
export.config = {
// MANDATORY: Add geckodriver to service array.
// Default: empty array
services: [
[
'geckodriver',
// service options
{
// The path where the output of the Geckodriver server should
// be stored (uses the config.outputDir by default when not set).
outputDir: './logs',
// pass in custom options for Geckodriver, for more information see
// https://github.com/webdriverio-community/node-geckodriver#options
geckodriverOptions: {
log: 'debug' // set log level of driver
}
}
]
],
};
`
The path where the output of the Safaridriver server should be stored (uses the config.outputDir by default when not set).
Type: string
The name of the log file to be written in outputDir. Requires outputDir to be set in WebdriverIO config or as service option.
Type: stringwdio-geckodriver-service-
Default:
Options that are passed into Geckodriver. See driver docs for more information.
Type: GeckodriverParameters{}`_
Default: _
----
For more information on WebdriverIO see the homepage.