UNPKG

casperjs

Version:

A navigation scripting & testing utility for PhantomJS and SlimerJS

12 lines (8 loc) 269 B
casper = require("casper").create() # listening to a custom event casper.on "google.loaded", (title) -> @echo "Google page title is #{title}" casper.start "http://google.com/", -> # emitting a custom event @emit "google.loaded", @getTitle() casper.run()