How to load the pages using PhantomJS -
i'm new phantomjs.i have tried load page using below code.but given page not loading while running this.
console.log('loading web page'); var page = require('webpage').create(); var url = 'http://www.phantomjs.org/'; page.open(url, function (status) { //page loaded! phantom.exit(); });
your code correct have before phantom.exit();
see examples here. let's capture web page screenshot :
console.log('loading web page'); var page = require('webpage').create(); var url = 'http://www.phantomjs.org/'; page.open(url, function (status) { //page loaded! page.render('phantomjs.png'); phantom.exit(); });
Comments
Post a Comment