Windows で CasperJS のテスト API を評価しています。残念ながら、Casper オブジェクトの test プロパティは常に未定義です。
次のスクリプトを実行すると、「this.test is undefined」が出力されます。
phantom.casperPath = 'D:\\GitHubSources\\casperjs';
phantom.injectJs(phantom.casperPath + '\\bin\\bootstrap.js');
var casper = require('casper').create();
casper.start('http://localhost:56679/index.html', function(){
this.echo('this.test is ' + this.test);
});
casper.run(function(){
this.exit();
});
ヒントはありますか?