December 2016
Intermediate to advanced
841 pages
17h
English
Writing an E2E test with Nightwatch.js is an intuitive process. We should be able to read an E2E test and be able to understand it even if it is the first time that we encounter one.
If we take a look at the following code snippet, we will see that, once we have reached the page, the test will wait 1 second for the body of the page to be visible. The test will then wait 0.1 seconds for some elements to be visible. The elements can be selected using CSS selectors or XPath syntax. If the elements are visible, the setValue method will insert 2 in the text input with base as ID and 3 in the text input with exponent as ID:
var test = { 'Calculator pow e2e test example' : function (client) { client .url('http://localhost:8080/') ...Read now
Unlock full access