Pages

Installation of Protractor?

Installation of Protractor?

Installation of protractor can be done by using nodeJs.

Node.Js:
  • NodeJs is a free open-source server environment and to run protractor we have to install the latest NodeJs version.
  • npm is automatically installed with nodejs.
  • We can install protractor using npm commands as npm comes with nodeJs.
  • once NodeJs installed in your system check the nodeJs version in command prompt.
  • To get installed node version use command node -v in command prompt.
Protractor Node version
Protractor Node version
SetUp the protractor:
  1. Use below npm command to install protractor globally in your system. Once install completed check protractor version in the command prompt using command protractor --version
  • npm -g install protractor, (where -g = install globally in the system)
  • This command will install webdriver-manager and protractor in your system.
  • webdriver manager is used to get an instance of selenium server running.
protractor Installation
Protractor Installation

   2. Now use web driver manager to install necessary libraries using below command:
  • web-driver manager update
  • This command will install the required libraries like Selenium server standalone,chromedriver,geckodriver, etc.,.
Protractor webdriver-manager update
Protractor webdriver-manager update
   3. Once updated the libraries, start up the selenium server using below command:
  • webdriver-manager start
  • This command will start the selenium server
protractor webdriver-manager start
protractor webdriver-manager start
protractor selenium server started
protractor selenium server started
  • If the selenium server started successfully, we will get session information - see the above screenshot.
  • Once the selenium server started, it will output a bunch of logs info logs while running protractor tests.
  • Your protractor test will send requests to this server to control a local browser.
Please comment below to feedback or ask questions.

No comments:

Post a Comment

Please comment below to feedback or ask questions.