if (new TakingScreenshotDecider(recorderStrategyRegister.get()).decide(event, result)) {
ScreenshotMetaData metaData = getMetaData(event);
metaData.setTestResult(result);
metaData.setResourceType(getScreenshotType());
When when = result.getStatus() == TestResult.Status.FAILED ? When.FAILED : When.AFTER;
DefaultFileNameBuilder nameBuilder = DefaultFileNameBuilder.getInstance();
String screenshotName = nameBuilder
.withMetaData(metaData)
.withStage(when)