Merge pull request #989 from Xenik007/master
ref #987 - Support for phantomjs v2.x
Showing
1 changed file
with
11 additions
and
8 deletions
... | @@ -101,16 +101,19 @@ CasperError.prototype = Object.getPrototypeOf(new Error()); | ... | @@ -101,16 +101,19 @@ CasperError.prototype = Object.getPrototypeOf(new Error()); |
101 | phantom.exit(); | 101 | phantom.exit(); |
102 | } | 102 | } |
103 | 103 | ||
104 | (function(version) { | 104 | (function (version) { |
105 | // required version check | 105 | // required version check |
106 | if (version.major !== 1) { | 106 | if (version.major === 1) { |
107 | return __die('CasperJS needs PhantomJS v1.x'); | 107 | if (version.minor < 8) { |
108 | } if (version.minor < 8) { | 108 | return __die('CasperJS needs at least PhantomJS v1.8 or later.'); |
109 | return __die('CasperJS needs at least PhantomJS v1.8 or later.'); | 109 | } |
110 | } | 110 | if (version.minor === 8 && version.patch < 1) { |
111 | if (version.minor === 8 && version.patch < 1) { | 111 | return __die('CasperJS needs at least PhantomJS v1.8.1 or later.'); |
112 | return __die('CasperJS needs at least PhantomJS v1.8.1 or later.'); | 112 | } |
113 | } else if (version.major === 2) { | ||
114 | console.log("Warning PhantomJS v2.0 not yet released. There will not be any official support for any bugs until stable version is released!"); | ||
113 | } | 115 | } |
116 | else return __die('CasperJS needs PhantomJS v1.x or v2.x'); | ||
114 | })(phantom.version); | 117 | })(phantom.version); |
115 | 118 | ||
116 | // Hooks in default phantomjs error handler | 119 | // Hooks in default phantomjs error handler | ... | ... |
-
Please register or sign in to post a comment