Commit cafb17c5 cafb17c536b30f3dcaa7a359b1ce533cf4c57dd0 by Mickaël Andrieu

Merge pull request #989 from Xenik007/master

ref #987 - Support for phantomjs v2.x
2 parents 239e9718 00b56a00
......@@ -101,16 +101,19 @@ CasperError.prototype = Object.getPrototypeOf(new Error());
phantom.exit();
}
(function(version) {
(function (version) {
// required version check
if (version.major !== 1) {
return __die('CasperJS needs PhantomJS v1.x');
} if (version.minor < 8) {
if (version.major === 1) {
if (version.minor < 8) {
return __die('CasperJS needs at least PhantomJS v1.8 or later.');
}
if (version.minor === 8 && version.patch < 1) {
return __die('CasperJS needs at least PhantomJS v1.8.1 or later.');
}
} else if (version.major === 2) {
console.log("Warning PhantomJS v2.0 not yet released. There will not be any official support for any bugs until stable version is released!");
}
else return __die('CasperJS needs PhantomJS v1.x or v2.x');
})(phantom.version);
// Hooks in default phantomjs error handler
......