prince
prince

Reputation: 611

How to run protractor?

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......

Upvotes: 5

Views: 12940

Answers (4)

vdrulerz
vdrulerz

Reputation: 264

You can install selenium standalone using "node install_selenium_standalone", if you directly write install_selenium_standalone on the command prompt it wont run, to install it with node you will need to have node installer installed on ur system its set up is very simple you can get the MSI from nodejs office website http://nodejs.org/download/

Let me know if you are still facing this error.

Upvotes: 0

Darren
Darren

Reputation: 9499

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.

Upvotes: 3

Kunal Kapadia
Kunal Kapadia

Reputation: 3353

Install node first and then use node ./node_modules/protractor/bin/webdriver-manager update

Upvotes: 5

Sten Muchow
Sten Muchow

Reputation: 6701

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

Upvotes: 7

Related Questions