0

I am trying to use Casperjs to run some tests on a site that is hosted internally. The website when brought up on chrome usually has this error - Your Connection is not private. curl to that url gives me a 200.

This is the code used

 var casper = require('casper').create();

casper.start('https://internalsite', function() {
  this.echo(this.getTitle());
});

casper.run();

I ran it with casperjs --ignore-ssl-errors=yes test.js it gave me a blank output.

How do I debug this? I set loglevel to Debug, no new info was shown.

Thanks

Sarath Subramanian
  • 20,027
  • 11
  • 82
  • 86
moorecats
  • 3,242
  • 3
  • 21
  • 23
  • What version of PhantomJS do you have? If you have something below 1.9.8, you can try running with `--ssl-protocol=any`. If this solves your problem, then this is the dupe: [CasperJS/PhantomJS doesn't load https page](http://stackoverflow.com/questions/26415188/casperjs-phantomjs-doesnt-load-https-page) – Artjom B. Dec 09 '14 at 11:48
  • I checked phantomjs --version gives 1.9.7. So, I tried ssl-protocol=any which unfortunately did not work. – moorecats Dec 09 '14 at 13:24
  • Have you verified that it is in fact not an SSLv3 problem by registering to `resource.error`. You should also register to `page.error` and `remote.message` – Artjom B. Dec 09 '14 at 13:27
  • 2
    Just did, resolved it based on the link you posted above - casperjs --ssl-protocol=tlsv1 --ignore-ssl-errors=true test.js Thank you!! – moorecats Dec 09 '14 at 13:28

0 Answers0