Thursday 23 March 2017

Protractor : Installation of Protractor to your Machine

Protractor Installation:
***Use npm to install protractor globally***
·         Open the command prompt
·         Enter npm install g Protractor


·         click enter button
·         It will take couple of minutes to install
·         It will install two command line tools 1) protractor and 2) webdriver-manager.
·         Open command prompt and enter 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.
What is the use of webdriver-manager:
The web driver manager is used for running the tests against the angular web application in a specific browser. After Protractor is installed, the web driver manager needs to be updated to the latest version
·         Open the command prompt and enter below command and click enter button
webdriver-manager update



·         Once Protractor is used to run any test, the web driver will automatically load and run the test in the relevant browser. To start the web driver manager, the following command needs to be executed from the command prompt.
·         Now start up a server with:
webdriver-manager start
·         The above will start up a Selenium Server and will output a bunch of info logs.
·          Your Protractor test will send requests to this server to control a local browser. Leave this server running.
·          You can see information about the status of the server at http://localhost:4444/wd/hub.

No comments:

Post a Comment