X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=test%2Fphantom%2Fscreenshot.js;h=40f9937441185544a9e7797061fefc91fdea7cc4;hb=8add358598355ffee140cd0156051c053018c65c;hp=08e230d43b439cb088546832564b0fe7055bbcd6;hpb=ad3295052fac50a2f7b9a9e50043dc02a8d119ac;p=mkws-moved-to-github.git diff --git a/test/phantom/screenshot.js b/test/phantom/screenshot.js index 08e230d..40f9937 100644 --- a/test/phantom/screenshot.js +++ b/test/phantom/screenshot.js @@ -3,6 +3,7 @@ var page = require('webpage').create(), var url = system.args[1] || 'http://www.indexdata.com/'; var file_png = system.args[2] || 'indexdata.png'; +var timeout = system.args[5] ? system.args[5] : 0.2; if (system.args.length === 1) { console.log('Usage: screenshot.js '); @@ -23,7 +24,7 @@ page.clipRect = { page.open(url, function () { // small delay setTimeout(function () { - page.render(file_png); + var ret = page.render(file_png); phantom.exit(); - }, 200); + }, timeout * 1000); });