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_modules/casperjs/bin/bootstrap.js'); var casper = require('casper').create({ viewportSize: config.viewportSize }); casper.test.begin('Runing tests here', 5, function suite(test) { // Tests here });
Without the casper.test.begin()
my tests function fine. I have the correct version 1.1.0
which can use this test suite but I get the following error in my console:
CasperError: casper.test property is only available using the `casperjs test` command
The CasperJS docs mentions this too: http://docs.casperjs.org/en/latest/testing.html. My question is how do I run this Casper under this command in the above code so I can use these tests?
Thanks!