Selenium Webdriver provides TakeScreenShot interface to take the screen shot
go to url for more information :
http://selenium.googlecode.com/svn@7074/trunk/docs/api/java/index.html
This is very useful when ever there is failure we can take screen shot and store in location for future reference.
Script :