This recipe introduces the PhantomCSS library for CasperJS and illustrates how to test for visual regressions in web pages.
To run this recipe, the CasperJS binary must be installed and on our
PATH; we will also need a script that expects to use the CasperJS API to navigate to and inspect a web page.
We will need the PhantomCSS library, and we will need to make it available to our CasperJS script.
PhantomCSS is a module for CasperJS that can automate visual regression testing. It is an open source (MIT licensed) project and is available at the following GitHub repository at https://github.com/Huddle/PhantomCSS.
The PhantomCSS script is available in the downloadable code repository as ...