node.js complaining that “The ChromeDriver could not be found on the current PATH” even though chromedriver is on the path

To add to Niels’ answer, for those not using Babel

  1. First install the chromedrive package using npm. If you install globally ensure to have node packages in your path
npm install -g chromedriver

If PATH errors persist, just save it to the local project’s dependencies

npm install --save-dev chromedriver
  1. For those not using Babel
const webdriver = require('selenium-webdriver');
const chrome = require('selenium-webdriver/chrome');
const chromedriver = require('chromedriver');

chrome.setDefaultService(new chrome.ServiceBuilder(chromedriver.path).build());

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)