I am learning PhantomJS for scraping. I started to incorporate CasperJS. When I run CasperJS and the filename I get back
CasperJS needs PhantomJS v1.x
This message is shown if you try to use PhantomJS 2.x with a CasperJS version <= 1.1-beta.
If you also have PhantomJS 1.x on your system, you can simply change the executable like this in the command prompt.
cmd.exe:
C:\path> set PHANTOMJS_EXECUTABLE=C:\path\to\phantomjs198.exe
C:\path> casperjs script.js
terminal:
$ export PHANTOMJS_EXECUTABLE=/path/to/phantomjs198
$ casperjs script.js
You can also use "phantomjs198" instead of "/path/to/phantomjs198" if it is in PATH.
The other way would be to use the CasperJS from the master branch on GitHub (docs). It works rather well in my experience and supports PhantomJS 2.x (and PhantomJS 1.x).