1

Running test on Windows 7

In casperjs i tried to open my https page as below:

...
var Link1 = 'https://mylink1.com/';
casper.waitForSelector("input#KeyField", function() {
        console.log(Link1);
        this.sendKeys('input#KeyField', Link1 );
    });
casper.then(function() {
        this.echo(this.getTitle());
        this.capture(dir1 + 'image1.png', {
            top: 0, left: 0, width: 2000, height: 1000
            });
        });
...

Casperjs will not open the link, but using "http" for same page from my local, it simply works.

Then I have tried stuff like:

  • casperjs test mytest1.js --ignore-ssl-errors=true --ssl-protocol=tlsv1
  • casperjs test mytest1.js --web-security=no
  • casperjs test mytest1.js--ssl-protocol=any
  • casperjs test mytest1.js --ignore-ssl-errors=yes
  • casperjs --ignore-ssl-errors test mytest1.js

still, casperjs could not open it. any ideas pls.

tnp
  • 41
  • 1
  • 6
  • possible duplicate of [CasperJS/PhantomJS doesn't load https page](http://stackoverflow.com/questions/26415188/casperjs-phantomjs-doesnt-load-https-page) – Artjom B. Nov 24 '14 at 09:53
  • yes it helped for sure. it's a known bug from phantomjs, i upgraded already to 1.9.8. thanks – tnp Nov 24 '14 at 16:44

1 Answers1

1

This worked for me:

casperjs test mytest1.js --ignore-ssl-errors=true
Andy
  • 49,085
  • 60
  • 166
  • 233
user2908957
  • 69
  • 1
  • 3