<commit_before>[![Build Status](https://travis-ci.org/markelog/gulp-wdio.svg?branch=master)](https://travis-ci.org/markelog/gulp-wdio)

# gulp-wdio

Same as [gulp-webdriver](https://github.com/webdriverio/gulp-webdriver) with three key differences:
- built-in browserstack support
- built-in selenium support
- included webdriver.io package (so you wouldn't have to)

So you could just simple do –
```js
var wdio = require('gulp-wdio');

gulp.task('e2e', function () {
  return gulp.src('path/to/wdio.conf.js').pipe(wdio({

    // Omit "type" property if you want start wdio without additional layers
    type: 'selenium',  // or "browserstack"
    wdio: {} // Same arguments as with `wdio --help`
  }));
});
```

Instead of something like this (taken [from](https://github.com/webdriverio/gulp-webdriver/blob/72c088ece031c70e568296583ef6170bec4ac58d/gulp/test.js) `gulp-webdriver` test script) –
```js
// For local selenium
import gulp from 'gulp'
import selenium from 'selenium-standalone'
import webdriver from '../lib/index'

export default options => {
    let errorLog = options.errorHandler('Selenium start')

    gulp.task('selenium:start', done => {
        selenium.install({
            logger (message) {<commit_msg>Update syntax of the example and add note about saucelabs to docs<commit_after>[![Build Status](https://travis-ci.org/markelog/gulp-wdio.svg?branch=master)](https://travis-ci.org/markelog/gulp-wdio)

# gulp-wdio

Same as [gulp-webdriver](https://github.com/webdriverio/gulp-webdriver) with three key differences:
- built-in browserstack support
- built-in selenium support
- included webdriver.io package (so you wouldn't have to)

So you could just simple do –
```js
const wdio = require('gulp-wdio');

gulp.task('e2e', () => {
  return gulp.src('path/to/wdio.conf.js').pipe(wdio({

    // Omit "type" property if you want start wdio without additional layers
    type: 'selenium',  // or "browserstack"
    wdio: {} // Same arguments as with `wdio --help`
  }));
});
```

Instead of something like this (taken [from](https://github.com/webdriverio/gulp-webdriver/blob/72c088ece031c70e568296583ef6170bec4ac58d/gulp/test.js) `gulp-webdriver` test script) –
```js
// For local selenium
import gulp from 'gulp'
import selenium from 'selenium-standalone'
import webdriver from '../lib/index'

export default options => {
    let errorLog = options.errorHandler('Selenium start')

    gulp.task('selenium:start', done => {
        selenium.install({
            logger (message) {
{'fraction_non_alphanumeric': 0.14456869009584664, 'fraction_numerical': 0.02156549520766773, 'mean_word_length': 4.091463414634147, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 8, 'https://': 8, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5055116', 'n_tokens_mistral': 903, 'n_tokens_neox': 836, 'n_words': 210}