title: Can any one explain Screenshot in Selenium?
body: <pre><code>WebDriver driver = new FirefoxDriver();
  
  driver.get("http://www.google.com/");
  
  File scrFile = ((TakesScreenshot)driver).getScreenshotAs(OutputType.FILE);
  
  // Now you can do whatever you need to do with it, for example copy somewhere
  FileUtils.copyFile(scrFile, new File("c:\\tmp\\screenshot.png"));
  </code></pre>
  
  <p>Can any tell me that </p>
  
  <pre><code>File scrFile = ((TakesScreenshot)driver).getScreenshotAs(OutputType.FILE) 
  </code></pre>
  
  <p><code>getScreenShotAs</code> is the method in the <code>TakesScreenshot</code> Interface......</p>
  
  <p><code>(TakesScreenshot)driver</code>, What it refers to??? can you please explain little bit?</p>