Testing with DalekJS

DalekJS is an open source UI testing tool that is written entirely in JavaScript. It acts as a test runner. It has its own API to perform user interface interactions. A very interesting feature of DalekJS is that it works with different browsers. It is capable of running tests in PhantomJS and popular browsers such as Chrome, Safari, Firefox, and Internet Explorer. It uses a WebDriver JSON-Wire protocol to communicate with these browsers and basically control what goes on in them.

Installing DalekJS

First, we need to install DalekJS's command-line tool. It is distributed as a Node.js package. So, the following command will download the necessary files:

npm install dalek-cli -g

When the process finishes, we can run the dalek ...

Get Node.js By Example now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.