Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Casperjs "casper.test property is only available using the `casperjs test` command" but not calling casper test

The error:

casper.test property is only available using the `casperjs test` command

Searched my entire codebase for "casper.test", "this.test", "@test", etc, and none are present. Looking at the casper code, one of these needs to be triggered for this error to be raised.

The error is intermittent and only occurs on some casper runs. Has anyone else gotten this bug? I'm running 1.1.0-beta3.

like image 848
maxko87 Avatar asked Jan 13 '14 20:01

maxko87


2 Answers

You can add

phantom.casperTest = true;

at the top of the test file.

like image 51
Arvind Avatar answered Oct 16 '22 00:10

Arvind


Have you launch your script like this ?

casperjs test yourScript.js

like image 4
EpokK Avatar answered Oct 16 '22 00:10

EpokK