waitForExec broken on windows

69 views
Skip to first unread message

fabienlroy

unread,
Jul 5, 2017, 9:05:42 AM7/5/17
to CasperJS
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

Ken

unread,
Jul 5, 2017, 5:37:29 PM7/5/17
to CasperJS
Hi I think the waitForExec is just newly added to be released in v1.1.5, maybe that's why.

Reply all
Reply to author
Forward
0 new messages