Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
});
if (browserFailed) {
err = new Error('One or more tests on Selenium failed.');
}
next(err);
};
}
else {
grunt.log.writeln('No browsers configured for running on Saucelabs.');
}
}
};
//wd.js monkey patch for clearer errors
var _newError = wd.webdriver.prototype._newError;
wd.webdriver.prototype._newError = function (opts) {
var err = _newError(opts);
try {
err = new Error(err.cause.value.message
.match(/([\s\S]*) caused/)[1]
.match(/'([\s\S]*)'\n/)[1]
);
}
catch (e) {}
return err;
};
seleniumServer.kill();
});
if (browserFailed) {
err = new Error('One or more tests on Selenium failed.');
}
next(err);
};
}
else {
grunt.log.writeln('No browsers configured for running on Saucelabs.');
}
}
};
//wd.js monkey patch for clearer errors
var _newError = wd.webdriver.prototype._newError;
wd.webdriver.prototype._newError = function (opts) {
var err = _newError(opts);
try {
err = new Error(err.cause.value.message
.match(/([\s\S]*) caused/)[1]
.match(/'([\s\S]*)'\n/)[1]
);
}
catch (e) {}
return err;
};