Reputation: 21
I wanted to make a simple application with webdrivers and selenium could not find chromedriver when i open the app.js, Here is my code:
var webdriver = require('selenium-webdriver');
var driver = new webdriver.Builder().withCapabilities(webdriver.Capabilities.chrome()).build();
driver.get('http://www.helisos.win')
and here is the console error
Error: The ChromeDriver could not be found on the current PATH. Please download the latest version of the ChromeDriver from http://chromedriver.storage.googleapis.com/index.html and ensure it can be found on your PATH.
at new ServiceBuilder (C:\Users\pcrunn\Desktop\GermBot\node_modules\selenium-webdriver\chrome.js:232:13)
at getDefaultService (C:\Users\pcrunn\Desktop\GermBot\node_modules\selenium-webdriver\chrome.js:321:22)
at Function.createSession (C:\Users\pcrunn\Desktop\GermBot\node_modules\selenium-webdriver\chrome.js:696:44)
at createDriver (C:\Users\pcrunn\Desktop\GermBot\node_modules\selenium-webdriver\index.js:155:33)
at Builder.build (C:\Users\pcrunn\Desktop\GermBot\node_modules\selenium-webdriver\index.js:647:16)
at Object.<anonymous> (C:\Users\pcrunn\Desktop\GermBot\app.js:3:88)
at Module._compile (module.js:643:30)
at Object.Module._extensions..js (module.js:654:10)
at Module.load (module.js:556:32)
at tryModuleLoad (module.js:499:12)
Its my first post on stackoverflow. Sorry If you have any issues with understanding what is my problem.
Upvotes: 2
Views: 7067
Reputation: 1333
You need to download the driver here, and then add to the system path variable:
https://stackoverflow.com/a/44272417/7970301
https://unix.stackexchange.com/a/26059
https://stackoverflow.com/a/5545748/7970301
Upvotes: 2