Created
February 18, 2017 02:00
-
-
Save brendandahl/6864ae09c46c54524b42d51583fac82e to your computer and use it in GitHub Desktop.
Snapshot a page with slimer.js
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 webpage = require('webpage').create(); | |
webpage | |
.open('http://localhost:8000') | |
.then(function() { | |
// store a screenshot of the page | |
webpage.viewportSize = { width:650, height:320 }; | |
webpage.render('/home/bdahl/projects/gecko/page.png', | |
{ onlyViewport:true }); | |
slimer.exit(); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment