Tutorial by Examples

At it's most basic level, acceptance testing is essentially black-box testing, which is fundamentally concerned with testing inputs and outputs of a closed system. As such, there are three essential features to acceptance testing: locating a resource, reading data, and writing data. When it comes to...
Nightwatch supports creating custom commands that can simulating keystrokes, mouse clicks, and other inputs. A custom command can be chained with other Nightwatch commands, like so: module.exports = { "Login App" : function (client) { client .url("http://localhost:300...
Since Nightwatch has access to the browser console, it's possible to inspect client side objects using the .execute() API. In the following example, we're checking the Session object for a particular session variable. First, we begin by creating the file ./tests/nightwatch/api/meteor/checkSession...
To upload a file, you'll first need to create a /data directory, and add the file you'll want to upload. tests/nightwatch/data/IM-0001-1001.dcm Your form will need an input with type of file. (Some people don't like the styling options this input provides; and a common pattern is to make this in...
Page Objects are similar to Custom Commands; except they are collections of custom commands that are associated with a specific UI component. This works extremely well with modern component based design, such as in React. module.exports = { url: 'http://localhost:3000/login', commands: [{ ...

Page 1 of 1