Hi,
Fairly new to casper, I could not get waitForExec to run on W2K8.
Casperjs version: 1.1.4
Phantomjs version: 2.1.1
Code:
var casper = require("casper").create();
var utils = require("utils");
casper.waitForExec(null,['/C','dir'],
function(response) {
this.echo("Program finished by itself:" + JSON.stringify(response.data));
},
function(timeout, response) {
this.echo("Program finished by casper:" + JSON.stringify(response.data));
}
,5000);
casper.exit();
Result:
TypeError: Type error
C:/Users/roy_f.PRODGRP/phantomjs:/platform/casper.js:445
C:/Users/roy_f.PRODGRP/phantomjs:/platform/casper.js:445 in checkStarted
C:/Users/roy_f.PRODGRP/phantomjs:/platform/casper.js:2405 in waitFor
C:/Users/roy_f.PRODGRP/phantomjs:/platform/casper.js:2573 in waitForExec