Hound -> Create, Open, then Delete a Screenshot
While running integration tests with Hound, I wanted my test to take a screenshot, open it, and remove the screenshot after the test runs.
def screenshot do
shot = take_screenshot
System.cmd("open", [shot])
on_exit fn ->
:timer.sleep 500
File.rm(shot)
end
end
...like a charm :)
Tweet