0

I am trying to run tests against my vagrant box with lives at 192.168.0.100. In my hosts file I have 192.168.0.100 lc.mysite.com and the site loads fine and works normally at that url with chrome.

However, when I try and run my tests against it, the url fails and never loads anything. Remote urls work fine but the local ones are just failing.

How can I get casperjs to respect my hosts file? Or is it something else?

styks
  • 3,193
  • 1
  • 23
  • 36

2 Answers2

0

Turns out it was due to the url being ssl and it kept failing. Using this answer solved my issue.

CasperJS/PhantomJS failing SSL handshakes on some sites even with --ssl-protocol=any

Community
  • 1
  • 1
styks
  • 3,193
  • 1
  • 23
  • 36
0

If you are using a self-signed SSL certificate (e.g. on your development box), set phantomjs option

--ignore-ssl-errors=true

From the documentation:

--ignore-ssl-errors Ignores SSL errors (expired/self-signed certificate errors): 'true' or 'false' (default)

knb
  • 9,138
  • 4
  • 58
  • 85