Protractor Error for Gulp: Could not find chrome driver

Standard

While invoking protractor test from Gulp.js, I came across below issue:

2015-11-20_11-23-16

My protratcor.config.js file for gulp looks like:

exports.config = {
 
    seleniumAddress: 'http://localhost:4444/wd/hub',
 
    capabilities: {
        'browserName': 'chrome'
    }, 
 
    specs: ['./test1.js', './test2.js'],
    
    jasmineNodeOpts: {
        showColors: true, 
        defaultTimeoutInterval: 30000
    }
};

Solution:

Step 1: First of all make sure you have installed complete protractor package using below statement

npm install --save-dev gulp-protractor protractor

Step 2: Then in CMD after changing directory to your project, execute below command

webdriver-manager update --standalone

Then in explorer check file status under <project>\node_modules\protractor\selenium
2015-11-20_11-30-24

Step 3: Now in your protractor.config.js file for Gulp make sure you need to specify path for chrome driver and selenium jar, Please comment selenium address variable:

exports.config = {
    seleniumServerJar: './node_modules/protractor/selenium/selenium-server-standalone-2.48.2.jar',
 
    chromeDriver: './node_modules/protractor/selenium/chromedriver.exe',
 
    //seleniumAddress: 'http://localhost:4444/wd/hub',
    capabilities: {
        'browserName': 'chrome'
    }, 
    specs: ['./test1.js', './test2.js'],
    
    jasmineNodeOpts: {
        showColors: true, 
        defaultTimeoutInterval: 30000
    }
};

Solution Output:

Now execute your gulp task statement invoking protractor tests, tests would execute successfully.

2015-11-20_11-39-40

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s