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

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -