0 votes
in Protractor by
Why you choose Protractor when testing an application built on Angular or Angular JS and not Selenium?

1 Answer

0 votes
by

There is no rule that you must use Protractor when the UI is built with Angular or AngularJS. It depends upon your requirement and team knowledge. Both these tools (Protractor & Selenium) helps us in flawless browser automation.

You can just use plain Selenium for testing Angular applications. Protractor just makes it easier to test Angular application. Protractor is a framework for testing Angular applications.

It has Automatic Waiting for elements and you can access specific Angular elements by.model and by.binding. Also it implements the Page Objects in the framework making tests more maintainable if used correctly.

Some of the points to consider when taking a decision on whether to go with Protractor or not. These points are some of the features of Protractor that make it worthy for testing AngularJS applications.

1. Protractor is a wrapper around WebDriverJS and supports Behavior Driven Development Frameworks such as Jasmine, Cucumber, Mocha etc.,

2. Protractor works in conjunction with Selenium. It offers some other new locator strategies that automate the testing of AngularJS applications.

3. Protractor makes use of Selenium Grid to run Multiple browsers at once.

4. Protractor handles the $http or $timeout synchronisation issues arising out of Angular/Angular JS very well.

5. Angular/Angular JS code is written in JavaScript/TypeScript, and Protractor supports both these languages.

Related questions

0 votes
asked Apr 5, 2021 in Protractor by Robindeniel
0 votes
asked Apr 5, 2021 in Protractor by Robindeniel
...