PhantomJS >= 1.5 must be installed on your system. Check out PhantomJS' installation instructions, and:
Ensure to always install the latest stable version of PhantomJS;
Ubuntu users Double check the version of PhantomJS provided by your apt repository, if any. Often, only old versions are provided.
OSX users If you use Homebrew, you can install both CasperJS and PhantomJS using this command:
$ brew install casperjs
Installation can be achieved using git:
$ git clone git://github.com/n1k0/casperjs.git
$ cd casperjs
$ git checkout tags/1.0.0-RC1
$ ln -sf `pwd`/bin/casperjs /usr/local/bin/casperjs
Once PhantomJS and CasperJS installed on your machine, you should obtain something like this:
$ phantomjs --version
1.5.0
$ casperjs --version
1.0.0-RC1
You are now ready to write your first script!
Note The casperjs executable is written in Python, so you can also run it using the python command:
$ python /path/to/casperjs/bin/casperjs
CasperJS version 1.0.0-RC1 at /Users/niko/casperjs
Usage: casperjs script.(js|coffee) [options...]
Read the docs http://casperjs.org/
Note If for any reason you don't have access to Python or are running Windows, please check this FAQ entry.
Contribute!
Feel free to play with the code and report any issue on github. CasperJS has also its own on twitter account.