Select Page
Selenium Testing

Launching Selenium Webdriver Server using Gulp & Protractor

Being a leading QA Company, we write blogs on all prominent software testing topics and tools using our real-world experience. So stay sharp by subscribing to our Newsletter.

Launching Selenium Webdriver Server using Gulp & Protractor - Blog

Writing automated acceptance tests using Jasmine, Protractor & Gulp is very popular. In this blog post, you will learn how to launch Selenium Webdriver Server automatically using Gulp Protractor without using seleniumServerJar and seleniumAddress in Protractor configuration file.

Protractor & Gulp

Protractor Configuration File

In Protractor configuration file, don’t add seleniumAddress and seleniumAddress

exports.config = {
    // Capabilities to be passed to the webdriver instance.
    capabilities: {
        'browserName': 'chrome'
    },

    // Framework to use. Jasmine is recommended.
    framework: 'jasmine',

    specs: ['todo-spec.js'],

    jasmineNodeOpts: {
        defaultTimeoutInterval: 30000
    }
};  
Gulpfile.js
var gulp = require('gulp');
var protractor = require("gulp-protractor").protractor;

gulp.task("execute",function () {
        return gulp.src([])
            .pipe(protractor({
                configFile: "conf.js"
            }))
            .on('error', function(e) { throw e })
    }
);  

Now you can run your Gulp task without starting or configuring in conf.js.

Comments(0)

Submit a Comment

Your email address will not be published. Required fields are marked *

Talk to our Experts

Amazing clients who
trust us


poloatto
ABB
polaris
ooredo
stryker
mobility