After installing protractor and trying to execute: webdriver-manager start
in the command terminal, the following error is thrown:
[17:39:27] I/start - seleniumProcess.pid: undefined [17:39:27] W/start - Selenium Standalone server encountered an error: Error: spawn cmd ENOENT.
I pasted the latest chrome driver, gecko driver and selenium standalone in npm\node_modules\protractor\node_modules\webdriver-manager\selenium
, So I did not execute webdriver-manger update
within the command terminal.
I am not able to resolve this issue, any help would be greatly appreciated!
ENOENT errors indicate that your program wasn't able to find the necessary entity to proceed in execution, usually this is a file, directory, symlink, pipe, etc...
In your particular case it couldn't find: the Selenium Standalone server binary
This is because instead of following protractor
documentation and executing webdriver-manager update
to get the necessary binaries to start a Selenium server you simply pasted the binaries in a location that you thought protractor
would use to find said binaries. This location is incorrect, so you're unable to start the Selenium server properly. You can see where global npm_modules
are installed on your system by executing a: npm list -g
.
Typically this on Unix
based systems this location is: /usr/local/lib/node_modules
And on Windows
:
%USERPROFILE%\AppData\Roaming\npm\node_modules
In order to resolve this issue I would recommend you follow the documentation as it's stated or search through protractor
's source code to see where the binaries are actually stored.
Maybe you could try the following and see if this helps resolve your issue, directly from their documentation:
Use npm to install Protractor globally with:
npm install -g protractor
This will install two command line tools, protractor
and webdriver-manager
. Try running protractor --version
to make sure it's working.
The webdriver-manager
is a helper tool to easily get an instance of a Selenium Server running. Use it to download the necessary binaries with:
webdriver-manager update
Now start up a server with:
webdriver-manager start
This will start up a Selenium Server and will output a bunch of info logs.
Hopefully that helps!