javascript - Rendering differences between phantomjs and my web browser -
i trying take screenshot webpage phantomjs. use following code (which works) :
var args = phantom.args; var address = args[0]; var destination = args[1]; var page = require('webpage').create(); page.viewportsize = { width: 1349, height: 653 }; page.open(address, function () { page.render(destination); phantom.exit(); });
unfortunately, image phantomjs has differences see in browser (chrome , firefox). text sometime larger, button not have same behavior, ...
does explain why or how exact screenshot of see in browser ? !
look @ rasterize.js example , wiki page here.
sometimes need delay rendering few seconds.
Comments
Post a Comment