pioneer icon indicating copy to clipboard operation
pioneer copied to clipboard

chrome driver error on first run

Open sprugman opened this issue 10 years ago • 9 comments

scaffolding worked, but then

$ ./node_modules/.bin/pioneer

lead to

Configuration loaded from /Users/Micah/Sites/kydaepi/admin/pioneer.json


Feature: Simple Feature   # tests/features/simple.feature



  Scenario: Entering Information


/Users/Micah/Sites/kydaepi/admin/node_modules/pioneer/node_modules/selenium-webdriver/lib/webdriver/promise.js:1643
      throw 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 Error ()
    at new ServiceBuilder (/Users/Micah/Sites/kydaepi/admin/node_modules/pioneer/node_modules/selenium-webdriver/chrome.js:51:11)
    at getDefaultService (/Users/Micah/Sites/kydaepi/admin/node_modules/pioneer/node_modules/selenium-webdriver/chrome.js:216:22)
    at Object.createDriver (/Users/Micah/Sites/kydaepi/admin/node_modules/pioneer/node_modules/selenium-webdriver/chrome.js:450:32)
    at createNativeDriver (/Users/Micah/Sites/kydaepi/admin/node_modules/pioneer/node_modules/sele

sprugman avatar Sep 14 '14 16:09 sprugman

Downloading from http://chromedriver.storage.googleapis.com/index.html fixed the issue, but the docs should cover that.

sprugman avatar Sep 14 '14 16:09 sprugman

I had the same problem. I solved it this way for running pioneer.js from gulp and also not having to install the chromedriver globally (so I don't need extra setup on my CI server):

  1. npm install chromedriver --save-dev installs the chromedriver under ./node_modules/.bin/chromedriver
  2. npm install npm-path --save-dev that allows to platform-independently include ./node_modules/.bin/ in the path
  3. npm install gulp-shell so I can execute pioneer.js in the command line

My gulpfile.js looks like this:

var gulp = require('gulp');
var shell = require('gulp-shell');

require('npm-path').setSync();

gulp.task('test', shell.task('./node_modules/.bin/pioneer'));

Maybe that is a good addition to the docs, too.

EDIT: npm-path is not required here since gulp-shell already prepends ./node_modules/.bin/ in the path.

analog-nico avatar Sep 23 '14 18:09 analog-nico

Yeah this issue boils down to the fact that you need chromedriver in your path for everything to work (with chromedriver). I do not think a plain ol install of pioneer should do this however perhaps we should expose a ./pioneer --install-chromedriver command

thoughts?

samccone avatar Sep 23 '14 19:09 samccone

Just a warning in the installation steps would have been enough for me...

sprugman avatar Sep 23 '14 20:09 sprugman

I did some research and got smarter. ;)

We are trying to solve an issue that selenium-webdriver does not intend to solve. In their installation instructions they say:

In addition to the npm package, you will have to download the WebDriver
implementations you wish to utilize. As of 2.34.0, `selenium-webdriver`
natively supports the ChromeDriver.
Simply download a copy and make sure it can be found on your `PATH`. The other
drivers (e.g. Firefox, Internet Explorer, and Safari), still require the
standalone Selenium server.

Protractor solves this issue by installing a self-developed 'webdriver-manager'. Since it is available as a standalone module you could install it with pioneer.js, too.

analog-nico avatar Sep 23 '14 20:09 analog-nico

@sprugman I agree, a short line in the installation steps would help for now. I guess nearly everyone stumbles over it.

analog-nico avatar Sep 23 '14 20:09 analog-nico

yeah ok great call guys, I will add this to the next release marker :)

Thanks so much for the feedback, and if you ever want to chat come join me in the chatroom http://gitter.im/mojotech/pioneer

samccone avatar Sep 23 '14 20:09 samccone

Related https://github.com/mojotech/pioneer/issues/225

samccone avatar Sep 24 '14 16:09 samccone

I've also got this error:

Error: The ChromeDriver could not be found on the current PATH.

Not sure that's the right solution -- but to make it work I have to download the chrome driver & copy it to /usr/bin. The getting started guide should be definitely updated :| could do PR if I was sure my approach is valid ;)

sdvig avatar Apr 22 '15 10:04 sdvig