cucumber-wd-plugin
Provide this plugin with a reference to the cucumber runtime and it will initialize a selenium session given
a set of configuration data and automatically close your session after cucumber completes
Configuration
see lib/defaultConfig.js for an example config
If you are using SauceLabs be sure to set your SAUCE_USERNAME and SAUCE_ACCESS_KEY in your environment variables
or pass them in your config. See wd's readme for details.
Usage
If you're functionally executing cucumber you can pass the runtime:
var wdPlugin = require('cucumber-wd-plugin')
var browserPromise = wdPlugin(runtime, config)
In this case you'll need to create some gating method to wait for the browser to be constructed.
You can also register the plugin within a step definition (see example). This functionality is currently waiting on
a pull request.
Example
See this example for usage
Support
If you're using cucumber-js with grunt-cucumber
like I am you'll want to take a look at this pull request