This thread is trying to answer question "What is the best way to store screenshots in a different place, such as JFrog Artifactory or an AWS S3 bucket, and are there any existing solutions or APIs to detect when a screenshot was generated?"
Best way to start is to look into custom reporters https://playwright.dev/docs/test-reporters#custom-reporters.
If you will want to take artifacts from html report data folder then you'll need to use onExit()
method, otherwise if you want to take artifacts from test-results then I think you could do that onTestEnd
.
Rayrun is a community for QA engineers. I am constantly looking for new ways to add value to people learning Playwright and other browser automation frameworks. If you have feedback, email [email protected].