mirror of https://github.com/vitalif/phantomjs
commit
963366f6ce
|
@ -31,7 +31,7 @@ waitFor = (testFx, onReady, timeOutMillis=3000) ->
|
|||
|
||||
if phantom.args.length isnt 1
|
||||
console.log 'Usage: run-qunit.coffee URL'
|
||||
phantom.exit()
|
||||
phantom.exit(1)
|
||||
|
||||
page = new WebPage()
|
||||
|
||||
|
@ -42,7 +42,7 @@ page.onConsoleMessage = (msg) ->
|
|||
page.open phantom.args[0], (status) ->
|
||||
if status isnt 'success'
|
||||
console.log 'Unable to access network'
|
||||
phantom.exit()
|
||||
phantom.exit(1)
|
||||
else
|
||||
waitFor ->
|
||||
page.evaluate ->
|
||||
|
|
|
@ -36,7 +36,7 @@ function waitFor(testFx, onReady, timeOutMillis) {
|
|||
|
||||
if (phantom.args.length === 0 || phantom.args.length > 2) {
|
||||
console.log('Usage: run-qunit.js URL');
|
||||
phantom.exit();
|
||||
phantom.exit(1);
|
||||
}
|
||||
|
||||
var page = new WebPage();
|
||||
|
@ -49,7 +49,7 @@ page.onConsoleMessage = function(msg) {
|
|||
page.open(phantom.args[0], function(status){
|
||||
if (status !== "success") {
|
||||
console.log("Unable to access network");
|
||||
phantom.exit();
|
||||
phantom.exit(1);
|
||||
} else {
|
||||
waitFor(function(){
|
||||
return page.evaluate(function(){
|
||||
|
|
Loading…
Reference in New Issue