casper.options.waitTimeout = 1000;
Signature: waitFor(Function testFx[, Function then, Function onTimeout, Number timeout, Object details])
Waits until a function returns true to process any next step.
You can also set a callback on timeout using the onTimeout argument, and set the timeout using the timeout one, in milliseconds. The default timeout is set to 5000ms:
Example:casper.waitFor(function check() {
return this.evaluate(function() {
return document.querySelectorAll('ul.your-list li').length > 2;
});
}, function then() { // step to execute when check() is ok
this.captureSelector('yoursitelist.png', 'ul.your-list');
}, function timeout() { // step to execute if check has failed
this.echo("I can't haz my screenshot.").exit();
}, 60000); <====== here one minute of timeout
Read the documentation bellow
waitFor