Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Protractor - error when starting webdriver-manager, seleniumProcess.pid: undefined

I am facing a problem when starting webdriver-manager in node_modules\protractor with windows 7. the command is :

node webdriver-manager start

Then I got the following error messages:

seleniumProcess.pid: undefined
events.js:85
      throw er; // Unhandled 'error' event
            ^
Error: spawn ENOENT
    at exports._errnoException (util.js:742:11)
    at Process.ChildProcess._handle.onexit (child_process.js:1028:32)
    at child_process.js:1109:20
    at process._tickCallback (node.js:343:11)
    at Function.Module.runMain (module.js:492:11)
    at startup (node.js:124:16)
    at node.js:807:3

After searching on the Internet, I cannot find any similar question like mine that the seleniumProcess.pid is undefined.

Following is the output for java -version:

java version "1.7.0_71"
Java(TM) SE Runtime Environment (build 1.7.0_71-b14)
Java HotSpot(TM) 64-Bit Server VM (build 24.71-b01, mixed mode)

Any idea?

like image 763
user1402725 Avatar asked Oct 20 '25 18:10

user1402725


1 Answers

Ok, I figured out why I had this problem. You have only JRE, but

You will need to have the Java Development Kit (JDK) installed to run the standalone Selenium Server. Check this by running java -version from the command line. Tutorial

On Ubuntu I've done

$ sudo apt-get install openjdk-7-jdk

And now I have this Java:

$ java -version
java version "1.7.0_95"
OpenJDK Runtime Environment (IcedTea 2.6.4) (7u95-2.6.4-0ubuntu0.15.10.1)
OpenJDK 64-Bit Server VM (build 24.95-b01, mixed mode)

And webdriver-manager start works.

like image 157
Bunyk Avatar answered Oct 22 '25 07:10

Bunyk