Skip to content

serenity.take.screenshots property is being ignored during the tests execution #148

@Jordanlosa97

Description

@Jordanlosa97

It seems the screenshot process is taking the default procedure (FOR_EACH_ACTION)
The optionalScreenshotPreference object is not being created as the function

 private Optional<TakeScreenshots> classOverride() {
        if (StepEventBus.getParallelEventBus().isBaseStepListenerRegistered()) {
            Optional<Method> currentStepMethod = StepEventBus.getParallelEventBus().getBaseStepListener().getCurrentStepMethod();
            if (currentStepMethod != null && currentStepMethod.isPresent()) {
                return overriddenScreenshotPreferenceForClass(currentStepMethod.get().getDeclaringClass());
            }
        }
        return Optional.empty();
    }

is returning always Optional.empty();

image

That makes unnecessary screenshots are being saved

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions