Created
August 21, 2012 07:45
-
-
Save magnusnordlander/3413204 to your computer and use it in GitHub Desktop.
Take a screenshot with PhantomJS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var system = require('system'); | |
//create new webpage object | |
var page = new WebPage(); | |
//load the page | |
page.open(system.args[1], function (status) { | |
//fire callback to take screenshot after load complete | |
page.render(system.args[2]); | |
//finish | |
phantom.exit(); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment