public function saveScreenshot(AfterScenarioTested $event)
    {
        if ($this->shouldSaveScreenshot($event)) {
            $fileName = $this->filenameGenerator->generateFileName($event->getFeature(), $event->getScenario());
            $image = $this->screenshotTaker->getImage();
            $this->screenshotUploader->upload($image, $fileName);
        }

        $this->screenshotTaker->reset();
    }