title: Can Selenium take a screenshot on test failure with JUnit?
body: <p>When my test case fails, especially on our build server, I want to take a picture / screenshot of the screen to help me debug what happened later on.  I know how to take a screenshot, but I was hoping for a way in JUnit to call my <code>takeScreenshot()</code> method if a test fails, before the browser is closed. </p>
  
  <p>No, I don't want to go edit our bazillions of tests to add a try/catch.  I could maybe, just possibly be talked into an annotation, I suppose.  All of my tests have a common parent class, but I can't think of anything I can do there to solve this.</p>
  
  <p>Ideas?</p>