Explore Courses Blog Tutorials Interview Questions
0 votes
in Selenium by (7k points)

The connection with chromedriver is not working, when I launch the test and try click a simple button I get this:

Error: ChromeDriver did not start within 5000ms at Error (native)
at node_modules/spectron/lib/chrome-driver.js:58:25 at Request._callback (node_modules/spectron/lib/chrome-driver.js:116:45) at Request.self.callback (node_modules/spectron/node_modules/request/request.js:200:22) at Request. (node_modules/spectron/node_modules/request/request.js:1067:10) at IncomingMessage. (node_modules/spectron/node_modules/request/request.js:988:12) at endReadableNT (_stream_readable.js:913:12) at _combinedTickCallback (internal/process/next_tick.js:74:11) at process._tickCallback (internal/process/next_tick.js:98:9)

My code:

"use strict";


var Application = require('spectron').Application;

var assert = require('assert');

const webdriver = require('selenium-webdriver');

const driver = new webdriver.Builder()



    chromeOptions: {

      binary: "./appPath/app"





describe('Application launch', function () {


  var app;

  beforeEach(function () {

    app = new Application({

      path: "./appPath/app"


    return app.start();


  afterEach(function () {

    if (app && app.isRunning()) {

      return app.stop();



  it('click a button', function* () {

    yield driver.sleep(5000);

    yield driver.findElement(webdriver.By.css(".classSelector")).click();





1 Answer

0 votes
by (31.9k points)

You can use Spectron or WebdriverJS for you test.

If you are using WebdriverJS, then run


 in this step.

Want to learn Selenium, checkout our Selenium training.

Browse Categories