I am using selenium to perform integration tests on a Scala web app. I would like to either screenshot or print the html of a page into the console whenever a test fails. My current set up is Scalatest using Selenium 2.0, with Spec.
Is there anyway to intercept a failure or determine the state of a test from a AfterEach override method?