Files
zulip/zephyr/tests/frontend/casperjs/samples/statushandlers.coffee
Keegan McAllister 921f7832c5 Import CasperJS 1.0.0-RC4-0-g8c798c7
(imported from commit b24184d9de034ecf4054dbc72cd6c28b49309182)
2012-11-13 10:59:02 -05:00

16 lines
360 B
CoffeeScript

###
This script will add a custom HTTP status code handler, here for 404 pages.
###
casper = require("casper").create
httpStatusHandlers:
404: (self, resource) ->
@echo "Resource at #{resource.url} not found (404)", "COMMENT"
verbose: true
casper.start "http://www.google.com/plop", ->
@echo "Done."
@exit()
casper.run()