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
CasperError: casper.test property is only available using the
casperjs testcommand
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