|
@@ -112,8 +112,17 @@ var PhantomasWrapper = function() {
|
|
|
|
|
|
// It's time to launch the test!!!
|
|
|
var triesNumber = 2;
|
|
|
+ var currentTry = 0;
|
|
|
|
|
|
async.retry(triesNumber, function(cb) {
|
|
|
+
|
|
|
+ currentTry ++;
|
|
|
+ // Fix for https://github.com/gmetais/YellowLabTools/issues/114
|
|
|
+ if (currentTry === 2 && options.engine === 'webkit2') {
|
|
|
+ debug('Launching a second try with the old webkit v1 engine');
|
|
|
+ options.engine = 'webkit';
|
|
|
+ }
|
|
|
+
|
|
|
var process = phantomas(task.url, options, function(err, json, results) {
|
|
|
var errorCode = err ? parseInt(err.message, 10) : null;
|
|
|
|