it seems stepTImeout is not working
I'm using
var casper = require('casper').create({
verbose: true,
loglevel: "debug",
stepTimeout: 30000,
onStepTimeout: function(self,m) {
console.log('timeout: step' + m);
this.echo("reloading");
this.reload(function() {
this.echo("loaded again");
});
},
onWaitTimeout: function(self,m) {
console.log('timeout: step' + m);
this.echo("reloading");
this.reload(function() {
this.echo("loaded again");
});
}
});
as I'm watching the script run, the timeout message pops not even reached 30 sec, sometime it pops up twice continually.
and it shows reloading but does not show loaded again message, so I assume it didn't reload
Maybe I misunderstood about step timeout and steps.
Isn't steptimeout for every casper.then steps?
Can someone explain this?
and in waitforselector function, it seems the function execution for success never executes.
casper.waitForSelector(selector, function success() {
this.echo('found links');
}, function timeout(){
this.echo("reloading");
this.goto("timeoutloop2");
}, 20000);
it seems function timeout is executing but not function success.
This is my second question.
Can someone also explain this also?
Thanks