Summary

In this chapter, you learned how to run our test suite in different browsers. For this, we used two different tools: WebDriver and Protractor.

Although we can directly use WebDriver to do so, the setup and code can be a bit more cumbersome.

Protractor offers us a more streamlined approach than using WebDriver out-of-the-box. The setup and configuration are much easier, and the API that we are offered is more powerful.

This is especially important if your UI is written with AngularJS, since Protractor offers a special API to access and control elements in the context of AngularJS. You can find elements by bindings, model, or repeater. You can also set up test doubles for AngularJS modules, such as controller or service. Finally, Protractor ...

Get Learning Behavior-driven Development with JavaScript 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.