How to run protractor?
Solution 1
An alternate solution to the selenium standalone server is to use the binary that protractor gives us:
$ ./node_modules/protractor/bin/webdriver-manager update
This will download the files with selenium and make a start script
$ ./node_modules/protractor/bin/webdriver-manager start
This will start the standalone server.
A great article for Protractor setup and use:
http://www.ng-newsletter.com/posts/practical-protractor.html
Solution 2
Install node first and then use node ./node_modules/protractor/bin/webdriver-manager update
Solution 3
I was using the webdriver-manager update command and found that it was not successfully downloading the selenium-server-standalone-2.40.0.jar.
I manually downloaded the file and put it where it should be.
You may also have to install java and put it in your PATH variable as per https://github.com/angular/protractor/issues/369
..and don't forget to re-open the node.js command prompt after changing your PATH variable.
Related videos on Youtube
prince
Updated on September 15, 2022Comments
-
prince over 1 year
I'm very new to protractor. I am running this in Windows command line.
I followed the this tutorial https://github.com/angular/protractor/blob/master/docs/getting-started.md
I sucessfully run
npm install -g protractor
I don't know how to run this
node_modules/protractor/bin/install_selenium_standalone
If I run this straight away in command line. I am getting this error
'node_modules\protractor\bin\install_selenium_standalone' is not recognized as an internal or external command, operable program or batch file.
Help me to run this sucessfully. As well as this command
./selenium/start
I am waiting for the prompt response......
-
qorsmond about 10 yearsI had to install globaly first - npm install -g protractor
-
-
megathor almost 10 yearsSame issue here. My network was blocking the jar file to be downloaded.