Skip to content

Instantly share code, notes, and snippets.

@gerhardqux
Created August 6, 2019 05:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gerhardqux/b145ce5d2f3c8a36347043328f55bedf to your computer and use it in GitHub Desktop.
Save gerhardqux/b145ce5d2f3c8a36347043328f55bedf to your computer and use it in GitHub Desktop.
var page = require('webpage').create();
page.clipRect = {
width: 1824,
height: 984
};
page.viewportSize = {
width: 1824,
height: 984
};
page.open('http://localhost', function(status) {
just_wait();
});
function just_wait() {
setTimeout(function() {
console.log(status);
page.render('localhost.png');
console.log('Hello, world2!');
phantom.exit();
}, 5000);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment