TakeScreenshotOnEveryActionInterceptor onEveryActionInterceptor =
new TakeScreenshotOnEveryActionInterceptor(event, getTakeAndReportService(), interceptorRegistry.get());
interceptorRegistry.get().register(onEveryActionInterceptor);
}
} else {
DefaultFileNameBuilder nameBuilder = DefaultFileNameBuilder.getInstance();
String screenshotName = nameBuilder
.withMetaData(event.getMetaData())
.withStage(event.getWhen())
.withResourceIdentifier(ResourceIdentifierFactory.getResoruceIdentifier(event.getMetaData(), event.getWhen()))
.build();
event.setFileName(screenshotName);