How to take screenshots in Selenium at different time intervals and save it at different place?
<p>By using below script, I am taking only one Screenshot every time, which it overrides on the same screenshot.</p>

<p>What should I do If I want to take different screenshots at some small time of interval?</p>

<pre><code>public void screenShot() throws IOException, InterruptedException
{
    File scr=((TakesScreenshot)driver).getScreenshotAs(OutputType.FILE);

    File dest= new File("filPath/1.png");
    FileUtils.copyFile(scr, dest);
    Thread.sleep(3000); 
}
</code></pre>