Created
April 23, 2014 17:24
-
-
Save whatupdave/11224977 to your computer and use it in GitHub Desktop.
Read Raptor screenshot grabs with casperjs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
casper = require("casper").create() | |
root = "http://0.0.0.0:5000" | |
pages = [{ | |
delay: 5000, | |
name: "home" | |
path: "/" | |
}, { | |
name: "account" | |
path: "/confirm/4d178542b72dc85dacf43fc19c2b9041b02fe0eb" | |
}, { | |
name: "setup" | |
path: "/setup" | |
} | |
] | |
casper.start(root) | |
casper.each pages, (_, page) -> | |
@then -> | |
@viewport 1000, 600 | |
@thenOpen root + page.path, -> | |
@echo page.name + " " + page.path | |
@wait page.delay if page.delay | |
@then -> | |
@capture "#{page.name}.png" | |
casper.run() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment