1. Installation of CasperJS : open the Terminal and fire up these commands
$ brew update
$ brew install casperjs --devel
To test if the installation of casperjs was successful, type on terminal
$ which casperjs
you should get - /usr/local/bin/casperjs...