Improve this doc
WDIO with Grunt
grunt-webdriver is a grunt plugin to run selenium tests with the WebdriverIO testrunner.
If you haven’t used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you’re familiar with that process, you may install this plugin with this command:
npm install --save-dev grunt-webdriver
The “webdriver” task
In your project’s Gruntfile, add a section named
webdriver to the data object passed into
grunt.initConfig(). Your test should contain a
configFile property with a path to your wdio config. You can pass in additional options as cli arguments.
Run this task with the
grunt webdriver command.
The plugin is an easy helper to run WebdriverIO tests using the wdio test runner. You can find more information about the test runner on our docs page.
To use a cloud service like Sauce Labs make sure you define
key properties like in the example below to authenticate yourself with your username and access key.
All options get passed into to the wdio testrunner. You should define your main configurations within your wdio config file. The plugin allows you to easy overwrite them. You can find all available cli arguments here: http://webdriver.io/guide/testrunner/gettingstarted.html