protractor Getting started with protractor Installing and Setting up Protractor (On Windows)

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Extensions
> Step 2: And Like the video. BONUS: You can also share it!

Example

Requirements: Protractor requires the following dependencies to be installed prior to installation:

  • Java JDK 1.7 or higher
  • Node.js v4 or higher

Installation:

Download and install Node.js from this URL: https://nodejs.org/en/

To see if the Node.js installation is successfull, you can go and check the Environment variables. The 'Path' under System Variables will be automatically updated.

Path variable to check Node.js installation


You can also check the same by typing the command npm -version in command prompt which will give you the installed version.

command to check Node.js installation


Now Protractor can be installed in two ways: Locally or Globally.

We can install protractor in a specified folder or project directory location. If we install in a project directory, every time we run, we should run from that location only.

To install locally in project directory, navigate to the project folder and type the command

npm install protractor


To install Protractor globally run the command:

$ npm install -g protractor

This will install two command line tools, protractor and webdriver-manager.
Run protractor --version to ensure protractor was successfully installed.

webdriver-manager is used to download the browser driver binaries and start the selenium server.
Download the browser driver binaries with:

$ webdriver-manager update

Start the selenium server with:

$ webdriver-manager start

To download internet explorer driver, run the command webdriver-manager update --ie in command prompt. This will download IEDriverServer.exe in your selenium folder



Got any protractor Question?