Test AngularJS UI

Protractor has special features for AngularJS. You saw calls like element(by.id(...)) to get elements on a page. Since pages that use AngularJS often use directives like ng-model and ng-repeat, Protractor provides convenience functions to access those. When your tests interact with the web pages, Protractor waits for AngularJS to complete its processing and updating of the DOM elements and bindings.

In the TO-DO app, the page tasksa.html is AngularJS specific and makes use of the TasksController in the taskscontroller.js file. One major difference between the files tasksj.html and tasksa.html is the former uses ids whereas the latter has no ids at all. It uses a few AngularJS models, bindings, and a repeater. As a result, ...

Get Test-Driving JavaScript Applications now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.