A CasperJS script that crawls one or more pages on your site and tests for broken <a>
, <link>
, <script>
and <img>
links.
Install PhantomJs and CasperJs
npm install --save casper-crawl
casperjs crawl.js http://my-website.com
casperjs crawl.js http://my-website.com --pages=about,contact,careers/apply
This will test for broken urls on
http://my-website.com/about
http://my-website.com/contact
http://my-website.com/careers/apply
casperjs crawl.js http://my-website.com --httpUser=username --httpPassword=password
casperjs crawl.js --web-security=no --ignore-ssl-errors=true https://localhost:4000