Protractor 0.16.1 e2e AngularJS - Starting selenium standalone server... events.js:72 Error: spawn ENOENT
Asked Answered
F

1

6

Attempted Project: https://github.com/yearofmoo/angularjs-seed-repo

Environment:

Windows 7 64-bit
NodeJS v 0.10.24
Protractor v 0.16.1
grunt v0.4.2
grunt-cli v0.1.11

Notes:

For selenium, install_selenium_standalone has been replaced by webdriver-manager binary around 12/2/13 according to [Julie's post][1]. This seems to be related to the issue.

Also, git must be installed in the project directory and npm install must be run using Git Bash in Windows.

Error in Git Bash:

$ grunt test:e2e --debug
Running "connect:testserver" (connect) task
[D] Task source: c:\nodejs-0.10.24\node_modules\grunt-contrib-connect\tasks\conn ect.js Started connect web server on 127.0.0.1:9999.

Running "protractor:singlerun" (protractor) task
[D] Task source: c:\nodejs-0.10.24\node_modules\grunt-protractor-runner\tasks\pr otractor_runner.js Starting selenium standalone server...

events.js:72
      throw er; // Unhandled 'error' event
               ^
Error: spawn ENOENT
       at errnoException (child_process.js:980:11)
       at Process.ChildProcess._handle.onexit (child_process.js:771:34)

> Fatal error: protractor exited with code: 8

Fado answered 12/1, 2014 at 7:44 Comment(0)
B
13

Java is required to run selenium, so it seems You don't have any.

Bally answered 12/1, 2014 at 12:2 Comment(3)
Make sure you add the jrex/bin folder to you PATH as well.Holmium
In my case I had : export PATH=$JAVA_HOME/bin:$PATH but also needed export PATH=$JAVA_HOME/jre:$PATH to make it work.Tyche
This was helpful for me, but I also needed to run the npm console in admin mode.Ortega

© 2022 - 2024 — McMap. All rights reserved.