File screenshotTarget = new File(
new File(takeScreenshotEvent.getMetaData().getTestClassName(), takeScreenshotEvent.getMetaData().getTestMethodName()),
takeScreenshotEvent.getFileName());
Screenshot screenshot = screenshooter.get().takeScreenshot(screenshotTarget, screenshotType);
takenScreenshotsRegister.get().addTaken(screenshot);
takeScreenshotEvent.getMetaData().setHeight(screenshot.getHeight());
takeScreenshotEvent.getMetaData().setWidth(screenshot.getWidth());
screenshot.setResourceMetaData(takeScreenshotEvent.getMetaData());
ScreenshotEntry propertyEntry = new ScreenshotEntry();
propertyEntry.setPath(screenshot.getResource().getAbsolutePath());
propertyEntry.setPhase(takeScreenshotEvent.getWhen());
propertyEntry.setType(screenshot.getResourceType().toString());
propertyEntry.setSize(Long.toString(screenshot.getResource().length()));
propertyEntry.setWidth(screenshot.getWidth());
propertyEntry.setHeight(screenshot.getHeight());
takenScreenshotsRegister.get().addReported(screenshot);
propertyReportEvent.fire(new PropertyReportEvent(propertyEntry));
}