Click here to Skip to main content
15,890,579 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
This is my command line:

./phantomjs/bin/phantomjs --web-security=no --ssl-protocol=any --load-images=yes test.js  "https://somelinkwithimages.com"

Source for test.js is as blow:
JavaScript
var page = require('webpage').create();
var system = require('system');
var address;
if (system.args.length === 1) {
  phantom.exit(1);
}
address = system.args[1];
page.onResourceError = function(resourceError) {
  console.log('Error code: ' + resourceError.errorCode + '. Description: ' + resourceError.errorString);
};
page.open(address, function(status) {
    if(status === 'success' ){
        var title = page.evaluate(function() {
        return document.title;
        });
    }
    if (status !== 'success') {
        console.log("ERROR_PAGE_LOADING address loading failure");
        phantom.exit(ERROR_PAGE_LOADING);
    }
    else {
        console.log("seems like working");
        phantom.exit();
    }
});
console.log("Something is happening");

I guess, I am missing something in the command.
Posted

1 solution

Found the reason. Its phantomjs's bug. Its creating error related to memory
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900