First of all, I am not looking for any help in development or testing environment. Also I am new to phantomjs and all I want is just the command line operation of phantomjs
var pagehtml = page.evaluate("function() {"+ "return '' + document.head.innerHTML + '' + '' + document.body.innerHTML + '';" + "}"); fs.write('output.html',pagehtml,'w');