public File getScreenCapture() {
try {
String imgDir = System.getProperty(Constants.PROP_REPORT_DIR);
if (imgDir != null) {
File tempFile = File.createTempFile("screencap", ".png", new File(imgDir));
new ScreenCaptureAction(tempFile.getAbsolutePath(), getTopWindowId().getTitle(), scriptModel, windowMonitor)
.play(finder);
return tempFile;
} else
System.err.println("getScreenCapture(): Image directory is not set");
} catch (IOException e) {