public class ScreenshotCreator extends Object
Copyright (c) 2018 Daniel Keiss, Deutsche Telekom AG This file is distributed under the conditions of the Apache License, Version 2.0. For details see the file license on the toplevel.
| Modifier and Type | Field and Description |
|---|---|
protected @NonNull org.jbehave.core.reporters.StoryReporterBuilder |
reporterBuilder |
protected static String |
SCREENSHOT_PATH |
protected @NonNull WebDriverWrapper |
webDriverWrapper |
| Constructor and Description |
|---|
ScreenshotCreator(@NonNull org.jbehave.core.reporters.StoryReporterBuilder reporterBuilder,
@NonNull WebDriverWrapper webDriverWrapper) |
| Modifier and Type | Method and Description |
|---|---|
String |
createScreenshot(String storyFolder,
String step,
String status)
Create screenshot for given step.
|
protected boolean |
screenshotIsNotEmpty(String screenshotPath) |
protected String |
screenshotName(String step,
String status)
Create screenshot name from step, status and timestamp.
|
protected String |
screenshotUrl(String storyFolder,
String step,
String screenshotName,
String screenshotPath) |
protected static String SCREENSHOT_PATH
@NonNull protected final @NonNull org.jbehave.core.reporters.StoryReporterBuilder reporterBuilder
@NonNull protected final @NonNull WebDriverWrapper webDriverWrapper
public ScreenshotCreator(@NonNull
@NonNull org.jbehave.core.reporters.StoryReporterBuilder reporterBuilder,
@NonNull
@NonNull WebDriverWrapper webDriverWrapper)
public String createScreenshot(String storyFolder, String step, String status)
storyFolder - - The current story folder. Every story has it's own folderstep - - The current stepstatus - - The status of the current step: successful, failedprotected String screenshotName(String step, String status)
step - - The step namestatus - - Status of the current stepprotected boolean screenshotIsNotEmpty(String screenshotPath)
Copyright © 2017–2019. All rights reserved.