Using Casperjs with phantomjs 1.x may give inaccurate results. To fully use the benefits of phantom you shouldn’t install Casper with npm, bower or brew because that package already comes with an in built phantom 1.x version.
Just clone the git repository:
1
git clone git://github.com/n1k0/casperjs.git
and then create a symlink:
1
2
cd casperjs
ln -sf `pwd`/bin/casperjs /usr/local/bin/casperjs
Now if you install phantomjs 2 with brew:
1
brew install phantomjs
and run casperjs –v you should receive:
1
CasperJS version 1.1.0-beta3 at /Users/path/casperjs, using phantomjs version 2.0.0