captureStepArtifacts method
Future<bool>
captureStepArtifacts({
- required TestStepExecutor executor,
- required TestStep step,
- required int stepIndex,
- required StepScreenshotOptions options,
- TestStep? labelStep,
- Future<
bool> captureScreenshot()?,
Screenshot + Observer as one pair. Skipped shots never write Observer.
Implementation
Future<bool> captureStepArtifacts({
required TestStepExecutor executor,
required TestStep step,
required int stepIndex,
required StepScreenshotOptions options,
TestStep? labelStep,
Future<bool> Function()? captureScreenshot,
}) {
return captureStepReportArtifacts(
enabled: executor.context.config.screenshots.shouldCaptureStep(step.type),
captureScreenshot: captureScreenshot ??
() => captureAutomaticScreenshotForStepBestEffort(
executor: executor,
step: step,
stepIndex: stepIndex,
labelStep: labelStep,
pumpBeforeCapture: options.pumpBeforeCapture,
ensureTargetVisible: options.ensureTargetVisible,
waitForTarget: options.waitForTarget,
waitForLottie: options.waitForLottie,
stabilize: options.stabilize,
forFailure: options.forFailure,
observationDetail: options.observationDetail,
requireVisibleActionHighlight:
options.requireVisibleActionHighlight,
),
);
}