Search⌘ K

Publish Screenshots as Artifacts

Explore how to publish screenshots captured during Selenium automated tests as artifacts within Azure DevOps pipelines. This lesson helps you understand managing test evidence, accessing artifacts, and improving test result visibility within your automation projects.

We'll cover the following...

Publishing the screenshots is very similar to publishing the logs.

YAML
- task: PublishBuildArtifacts@1
displayName: 'Publish Screenshots as Artifact'
inputs:
PathtoPublish: $(System.DefaultWorkingDirectory)/target/screenshots
ArtifactName: screenshots

The PathtoPublish path ends now with the screenshots folder. The name of the artifact is screenshots.

After executing the pipeline, the screenshots artifact is ...