
Node Cookbook
By :

User Interface (UI) testing is a technique used to identify issues with Graphical User Interfaces (GUIs). The technique is commonly used to test web application interfaces.
For example, if you have an application containing an HTML form, you could use UI testing to validate that the HTML form contains the correct set of input fields. UI testing can also validate interactions with the interface – including simulating button or hyperlink clicks.
Puppeteer is an open source library that can be used to automate UI tests. Puppeteer provides a headless Chromium instance that can be programmatically interacted with.
In the recipe, we will use Puppeteer to UI test the website http://example.com/.
$ mkdir using-puppeteer $ cd using-puppeteer $ npm init --yes