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 O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.