actually this is code in line 514 in bold:
public void takeScreenshot(){
String filepath=Constants.SCREENSHOTPATH+currentTestName+"-"+currentIteration+".png";
File targetFile= new File(filepath);
[b:39uneng8]File srcFile=((TakesScreenshot)driver).getScreenshotAs(OutputType.FILE);[/b:39uneng8]
try {
FileUtils.copyFile(srcFile, targetFile);
} catch (IOException e) {
e.printStackTrace();
}
try to use this and see if error comes.
public void takeScreenshot() throws IOException{
File targetFile = new File(filepath);
File scrFile = ((TakesScreenshot) driver)
.getScreenshotAs(OutputType.FILE);
FileUtils.copyFile(scrFile, targetFile);
}