X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=test%2Fspec-dev%2Fscreenshot.js;fp=test%2Fspec-dev%2Fscreenshot.js;h=038f12d22f32e1db9615d117ed98ff782de21c7f;hb=552dacefd4ad7dfffad2d2784aa340916e8d2587;hp=95f9fa31dccf6ba98888518db248c9b6a0021027;hpb=a7ee7a9aaa023623354644923690d8d5da9b6624;p=mkws-moved-to-github.git diff --git a/test/spec-dev/screenshot.js b/test/spec-dev/screenshot.js index 95f9fa3..038f12d 100644 --- a/test/spec-dev/screenshot.js +++ b/test/spec-dev/screenshot.js @@ -3,7 +3,18 @@ var url = 'http://www.indexdata.com/'; var file_png = "indexdata.png"; var page = require('webpage').create(); + +// page.paperSize = { format: 'A4', orientation: "landscape" }; +page.viewportSize = { + width: 960, + height: 800 +}; +page.zoomFactor = 1.0; + page.open(url, function () { - page.render(file_png); - phantom.exit(); + // small delay + setTimeout(function () { + page.render(file_png); + phantom.exit(); + }, 500); });