Book Image

Learning Behavior-driven development with Javascript

Book Image

Learning Behavior-driven development with Javascript

Overview of this book

Table of Contents (17 chapters)
Learning Behavior-driven Development with JavaScript
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Chapter 8. Testing in Several Browsers with Protractor and WebDriver

Until now, we have been doing some quite advanced testing of our UI view layer, but all these tests have been executed against the Google Chrome browser, which is a fairly modern and powerful browser. This is acceptable if we know that our target audience is going to use this browser. Although in some scenarios, such as an internal private tool, this can be the case, in general any application targeted to the public web is going to be executed in a very heterogeneous set of browsers. Since there are not only different levels of adoptions of the HTML5 API, but also subtle bugs through different browsers, we really need to test our view layer in all the browsers that our audience is going to use.

In this chapter, you will see how to run the same test suite against different browsers using two different tools: WebDriver and Protractor, a very popular testing platform for AngularJS. This way, you will be able to take an informed...