• How to Set Up Protractor (Protractor Installation)

    Let’s see how to install Protractor. To setup Protractor, we need to follow the following steps.

    1. Install Node.js
    2. Install Protractor
    3. Update WebDriver Manager to the latest version

    Protractor Installation

    Step 1 – Download & Install Node.js

    Download and install node.js. Just follow installation guidelines and that is it.


    Download NodeJs

    Once the file is downloaded, open the downloaded file to start installing Node.JS

    Download NodeJs Run Installer

    To run the installer, click Next

    Download NodeJs Accept Terms

    Select the check box to “I accept the terms in the License Agreement” and click on Next to proceed.

    Download NodeJs Choose Path

    You can choose the path where you want Node.js to install in your system. Better to leave it the default path and click on Next.

    Download NodeJs Settings

    I recommend, leave as it is and click on Next. (You can change these settings, based on your requirement)

    Download NodeJs Install

    Click on Install to start the main installation.

    Download NodeJs Installing

    Let the installation finish

    Download NodeJs Installation Finish

    Click Finish on the above dialog. This will complete Node.js installation process.

    Node.js should set environment variables required without your help. So to verify the installation, just type “node –v” and “npm –v” in Command Prompt should give you current versions of node.js and

    Protractor Installation CMD

    In case of installation errors, you may need to set it by yourself and point it to the installation folder, for example, “C:\Program Files\nodejs\ (without quotes).

    Step 2 – Install Protractor

    We have installed Node.js in the Step 1. With node.js, we get Protractor npm package. So, now we can install protractor (also any Node.js packages) using node commands.

    Let’s install Protractor using simple node install command

    Open command prompt and type npm install –g protractor to install it globally.

    npm install g protractor

    Here, we used ‘-g’ to install protractor globally to run protractor from anywhere in the system. You can remove this if you wish not to install it globally.

    The above command will download the necessary files and install Protractor in your system. It also installed Webdriver-Manager.

    Once installation is done, use the following command to verify the version of Protractor.

    protractor –version

    If it is successful then it will show the version of protractor.

    Note: There is a double hyphen without any space before version in the above command.

    Verify Protractor Version

    Step 3 – Update Webdriver Manager

    Webdriver manager is used to run the tests against the angular web applications. Let us check the status of webdriver manager by using the below command.

    webdriver-manager status

    Webdriver Manager Status

    With Protractor installation, webdriver manager is also installed but it’s an empty package. So, we have to update the webdriver manager to the latest version.

    This can be done by running the following command in the command prompt.

    webdriver-manager update

    Webdriver Manager Update

    By running the above command, webdriver manager first downloading Jars & Executables (Selenium Standalone Server, ChromeDriver, & GheckoDriver) and then updating them to the latest version.

    webdriver-manager status

    WebDriver Manager Status

    Now we can observe that the Selenium Standalone Server, ChromeDriver, & GheckDriver are updated.

    Now start the web driver manager. To start the webdriver manager, run the below command.

    webdriver-manager start

    Now, if you navigate to the following URL, you will see the webdriver manager running in the background.


    Protractor Testing End-To-End AngularJS Application

    Must read:

    Sharing is caring.

    Share on facebook
    Share on twitter
    Share on linkedin

    Like This Post?

    We have a lot more where that came from?

    We only send really good stuff occasionally, promise.

    Rajkumar SM

    Leave a Comment

    Your email address will not be published. Required fields are marked *

    Share on facebook
    Share on google
    Share on twitter
    Share on linkedin
    Share on whatsapp

    Recent Posts:

    Scroll to Top
    API Testing eBook