if (strategy.get().isTakingAction(event, result)) {
ScreenshotMetaData metaData = getMetaData(event);
metaData.setTestResult(result);
metaData.setResourceType(getScreenshotType());
beforeScreenshotTaken.fire(new BeforeScreenshotTaken(metaData));
When when = result.getStatus() == TestResult.Status.FAILED ? When.FAILED : When.AFTER;
DefaultFileNameBuilder nameBuilder = DefaultFileNameBuilder.getInstance();
String screenshotName = nameBuilder