AngularJS End to End (E2E) Testing Protractor Installation and Setup
Last Updated :
08 Sep, 2022
The Protractor is an end-to-end test framework developed for Angular and AngularJS applications. It runs tests against the application interacting with it as a real user would, running in a real browser.
Features of Protractor:
- Tests using browser: Protractor uses native events and browser-specific drivers to interact with the application.
- Build for Angular: Protractor is built for Angular and thus the support is amazing.
- Automatic Waiting: You no longer need to add waits and sleeps to your test. Protractor automatically executes the next step in your test the moment the webpage finishes pending tasks, so you don’t have to be waiting for your test and webpage to sync.
Installation procedure for Protractor:
Protractor can be installed globally over NodeJS using the command given below:
// For Windows
npm install -g protractor
// For Linux
sudo npm install -g protractor
Note: For users in Ubuntu, you need to add sudo to all the given commands for permission.

Now to check if the installation was successful let's check the version of the protractor using the command given below:
protractor --version

The above screenshot says the version is 7.0.0 which means the installation was successful.
Setup: Now we have two commands available to us after the installation which are protractor and webdriver-manager. The webdriver-manager is a helper tool to easily get an instance of a Selenium Server running. There are two steps to be followed now:
Updating the binaries: We can update the necessary binaries using the below command.
// For Windows
webdriver-manager update
// For Linux
sudo webdriver-manager update

Starting the server: After this, we can run Selenium Server using the below command.
// For Windows
webdriver-manager start
// For Linux
sudo webdriver-manager start

After this, you can access the server at http://localhost:4444/wd/hub.

Similar Reads
AngularJS End to End (E2E) Testing | Protractor Protractor is an end-to-end test framework developed for Angular and AngularJS applications. It run tests against the application interacting with it as a real user would, running in a real browser. In this article, we are going to create a basic test. Pre-requisite: Installation and Setup of Protra
2 min read
How to test the id of an element using Protractor ? Protractor is an end-to-end test framework developed for Angular and AngularJS applications. It runs tests against the application interacting with it as a real user would, running in a real browser. In this article, we are going to test the id of an element. Pre-requisite: Installation and Setup of
2 min read
Angular Exercises, Practice Questions and Solutions Are you eager to elevate your web development skills with Angular or seeking to refine your expertise? Immerse yourself in our Angular Exercises, Practice Questions, and Solutions designed for both novices and seasoned developers. Our interactive platform offers engaging coding challenges, progress
3 min read
How To Test React App With Jest and React Testing Library? Jest is a JavaScript testing framework maintained by Facebook, designed with a focus on simplicity and support for large JavaScript applications, especially React. It offers built-in utilities like test runners, mocking, snapshot testing, and code coverage reporting.React Testing Library (RTL) is a
3 min read
How to test the name of tag of an element using Protractor ? Protractor is an end-to-end test framework developed for Angular and AngularJS applications. It runs tests against the application interacting with it as a real user would, running in a real browser. In this article, we are going to test the name of the tag of an element. Pre-requisite: Installation
2 min read