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 https://my-website.com
casperjs crawl.js https://my-website.com --pages=about,contact,careers/apply
This will test for broken urls on
https://my-website.com/about
https://my-website.com/contact
https://my-website.com/careers/apply
casperjs crawl.js https://my-website.com --httpUser=username --httpPassword=password
casperjs crawl.js --web-security=no --ignore-ssl-errors=true https://localhost:4000