title: How to take screenshots in Selenium at different time intervals and save it at different place error
body: <p>So I'm using this exact code by @Pawel_Awdmski. I get the error under (OutputType.FILE); says FILE cannot be resolved or is not in a field. Why does it give me that error? </p>
  
  <pre><code>import java.io.File;
  import java.io.IOException;
  import java.text.SimpleDateFormat;
  import java.util.Date;
  import java.util.List;
  import java.util.Random;
  
  import org.apache.commons.io.FileUtils;
  import org.eclipse.jetty.server.Response.OutputType;
  import org.openqa.selenium.By;
  import org.openqa.selenium.TakesScreenshot;
  import org.openqa.selenium.WebDriver;
  import org.openqa.selenium.WebElement;
  import org.openqa.selenium.chrome.ChromeDriver;
  import org.openqa.selenium.support.ui.Select;
  import java.util.NoSuchElementException;
  import org.testng.annotations.Parameters;
  import org.testng.annotations.Test;
  import java.io.*;
  public void screenShot() throws IOException, InterruptedException
  {
      File scr=((TakesScreenshot)driver).getScreenshotAs(OutputType.FILE);
      File dest= new File("filPath/screenshot_"+timestamp()+".png");
      FileUtils.copyFile(scr, dest);
      Thread.sleep(3000); 
  }
  
  public string timestamp() {
          return new SimpleDateFormat("yyyy-MM-dd HH-mm-ss").format(new Date());
  }
  </code></pre>