Writing E2E tests using Protractor - Advanced

So far, in earlier sections, we have covered installing, using, and writing test scripts using the Protractor framework. We have learned and implemented built-in methods and classes exposed by the Protractor API.

In this section, we will cover writing advanced test scripts, which will have interactions in the page, and test the elements thoroughly.

Take a look at the use cases that we will cover:

  1. We will test our array values.
  2. We will target our element using the class attribute.
  3. We will check the heading of the page.
  4. We will simulate the click event attached on a button and then verify the text changes of another element.

Let's get started with writing our test scripts.

We will need to first ...

Get Expert Angular 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.