Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error: Could not find chromedriver while following angularjs official tutorial

At first I have to say this is my first touch with angularjs and node.js so this will be probably a stupid issue, but I want to learn to work with angularjs so I followed this tutorial https://docs.angularjs.org/tutorial and everything went as expected, until I got to Running End to End Tests part.

When I run this command:

npm run update-webdriver

it says:

selenium standalone is up to date. 
chromedriver is up to date.

Then I turn on the local server:

npm start

And while its running I run tests:

npm run protractor

which in my terminal results into: o

Using ChromeDriver directly...

[launcher] Error: Could not find chromedriver at /home/qw/www/angular-phonecat/node_modules/protractor/selenium/chromedriver.exe

Th file chromedriver.exe really doesnt exists (there is chromedriver_2.10.zip), and I really dont think an .exe file should be there, considering Im using ubuntu 14.04 (this tutorial shoul be for angular version is 1.4.0).

Is this a tuto for some windows version?

Could anyone help me (the way a beginner could understand :) )?

like image 921
Matúš Bartko Avatar asked Mar 12 '15 22:03

Matúš Bartko


2 Answers

You need to use the webdriver-manager from inside the protractor package:

node_modules/protractor/bin/webdriver-manager update
like image 130
alecxe Avatar answered Nov 16 '22 18:11

alecxe


I was following the tutorial on AngularJS step 3 and had the same issue, but it was caused by missing chromedriver file. I solved it by the following steps:

  1. Go to folder angular-phonecat\node_modules\protractor\selenium to see if you have the following two files:

    • chromedriver.exe
    • selenium-server-standalone-2.42.2.jar
  2. If not, download the chromedriver from here: http://chromedriver.storage.googleapis.com/index.html and the selenium from here: http://docs.seleniumhq.org/download/

  3. Then put the downloaded files to the angular-phonecat\node_modules\protractor\selenium folder

  4. In the command window, enter npm start to startup the app and in the second command window, enter npm run protractor to run the end to end test with protractor.

Then you will see the lovely Chrome window come up and run the tests.

like image 35
Tony Avatar answered Nov 16 '22 18:11

Tony