is there any possibility to continue with loading the next page from a URL List after a timeout occured?
Example:
casper.test.begin('TEST CONTROLLER', function(test) {
var navigation = [
"http://www.url_1.com",
"http://www.url_2.com",
"http://www.url_3.com",
"http://www.url_4.com"
];
casper.start().then(function(){
/* Loop through all URLs so that all are visited */
casper.eachThen(navigation, (function(response){
var actUrl = response.data;
/* HERE THE NEXT PAGE IS LOADED */
casper.thenOpen(actUrl).waitForUrl(actUrl, function () {
/* Single tests for every resolution and link */
casper.each(testfiles, function (self, actTest, i) {
casper.then(function(){
require('.' + testfiles[i]);
});
});
}, function timeout() {
casper.echo("\n==================\nTimeout:\n=================", 'WARNING');
casper.test.fail("TIMEOUT");
casper.clear();
});
));
})
.run(function() {
this.test.done();
});
});
Let's assume the second page could not be loaded because of a timeout, how can i continue with the other sites from the array? Up to now i cannot do anything that continues it, it always stops with a timeout error.
Thanks in advice