July 2017
Intermediate to advanced
454 pages
10h 1m
English
In this section, let's start writing test scripts using Protractor. We will make use of the methods that we saw earlier in the chapter and element targeting to write our test scripts.
A general syntax of a Protractor framework test suite is as follows:
describe("Sample Test Suite", function() { it("This is a spec that defines test", function() { // expect statement to assert the logic etc });});
Analyze the preceding code snippet, and you will realize that it's very similar to the one we created for Jasmine test scripts. Bingo!
The test suites written for Jasmine and Protractor look similar. The major difference is that we make use of the element and browser modules through which we can target any specific DOM elements ...
Read now
Unlock full access