I have a casperjs script which gives the desired result when I run on a linux server, but when I run the same from my laptop, it doesn\'t work.
How should I debug? L
Add aYou need to add the following callbacks, to catch all the errors:resource.error
event handler:casper.on("resource.error", function(resourceError){ console.log('Unable to load resource (#' + resourceError.id + 'URL:' + resourceError.url + ')'); console.log('Error code: ' + resourceError.errorCode + '. Description: ' + resourceError.errorString); });
It seems, this is a known PhantomJS bug (Fixed in 2.5 beta).
You can download PhantomJS 2.5 beta from this page.See also:
CasperJS/PhantomJS doesn't load https page
PhantomJS failing to open HTTPS site
casper
.on("error", function(msg){ this.echo("error: " + msg, "ERROR") })
.on("page.error", function(msg, trace){ this.echo("Page Error: " + msg, "ERROR") })
.on("remote.message", function(msg){ this.echo("Info: " + msg, "INFO") });