Skip to content

Error to run protractor

Wendy edited this page Apr 11, 2014 · 6 revisions

Pay attention to

npm run update-webdriver

This will download and install the latest version of the stand-alone WebDriver tool.If you didn't correctly install webDriver. When you run
npm run protractor

You will get in trouble, this is what I got:

> angular-starter@0.0.1 protractor /Users/mac/Workplace/angular-starter
> protractor test/protractor-conf.js

Starting selenium standalone server...

/Users/mac/Workplace/angular-starter/node_modules/	protractor/node_modules/selenium-webdriver/lib/	webdriver/promise.js:1549
throw error;
        ^
Error: Server exited with 1
at Error (<anonymous>)
at ChildProcess.onServerExit (/Users/mac/Workplace/angular-starter/node_modules/protractor/node_modules/selenium-webdriver/remote/index.js:193:11)
at ChildProcess.g (events.js:180:16)
at ChildProcess.EventEmitter.emit (events.js:98:17)
at Process.ChildProcess._handle.onexit (child_process.js:797:12)

Cause of this failure:
You didn't correctly install webDriver.The following is the reason why I didn't install webDriver correctly.

  • Network - I connected my vpn, then successed[for GFW]

  • It may take much time - I thought shell is not * responding, so I ctrl+c it. But when I run it again:

      npm run update-webdriver
    

You will get in trouble, this is what I got:

    > angular-starter@0.0.1 update-webdriver /Users/mac/	Workplace/angular-starter
    > webdriver-manager update

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

I come to

    /node_modules/protractor/selenium
    ls
    chromedriver_2.8.zip    selenium-server-standalone-2.39.0.jar

removed "chromedriver_2.8.zip" and "selenium-server-standalone-2.39.0.jar", then fixed this error.

Clone this wiki locally