UNPKG

956 BJavaScriptView Raw
1'use strict';
2var gulp = require('gulp');
3
4// The protractor task
5var protractor = require('../').protractor;
6
7// Start a standalone server
8var webdriver_standalone = require('../').webdriver_standalone;
9
10// Download and update the selenium driver
11var webdriver_update = require('../').webdriver_update_specific;
12
13// Downloads the selenium webdriver - stupid solution to pass extra args like ignore_ssl
14gulp.task('webdriver_update', webdriver_update({
15 browsers: ['ignore_ssl']
16}));
17
18// Start the standalone selenium server
19// NOTE: This is not needed if you reference the
20// seleniumServerJar in your protractor.conf.js
21gulp.task('webdriver_standalone', webdriver_standalone);
22
23
24// Setting up the test task
25gulp.task('protractor', ['webdriver_update'], function(cb) {
26 gulp.src(['example_spec.js']).pipe(protractor({
27 configFile: 'protractor.conf.js'
28 })).on('error', function(e) {
29 console.log(e);
30 }).on('end', cb);
31});