So I have a file running in node which runs a local copy of PhantomJS as below shows:
phantom.casperPath = \'node_modules/casperjs\';
phantom.injectJs(\'node
you can also call casperjs test xyz.js
For more info, check the doco here : http://docs.casperjs.org/en/latest/testing.html
CasperError: casper.test property is only available using the
casperjs test
command
problem solved.
You have to include this line at the top of your script in your xyz.js
, so that the .test
property becomes true;
phantom.casperTest = true;
Then you should have no problem Launching from the terminal:
casperjs xyz.js