Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reuse Selenide screenshots #440

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

dstekanov
Copy link
Contributor

Context

The idea behind it is to not take screenshot 2 times (by Selenide and by Allure) but check if Selenide has already taken one and re-use it otherwise take a new screenshot.

Selenide issue history selenide/selenide#1002

Checklist

@@ -91,10 +95,24 @@ public AllureSelenide disableLogs(final LogType logType) {
}

private static Optional<byte[]> getScreenshotBytes() {
return ScreenShotLaboratory.getInstance().getLastThreadScreenshot()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what if you are using saveScreenshots=true and make a single screenshot manually at test start? It seems like you'll get the same screenshot in all the steps

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I understand correctly, it should not be a case because Selenide will take a separate screenshot on each fail

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dstekanov and what if we got a case, when someone manually produces a screenshot on fail to attach it to the Main Test Result Page and not under the steps, while also wanting that screenshot to be under given step? Also what if we use Junit assertAll with selenide boolean methods?

Copy link
Contributor

@lasnamae lasnamae left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, it was just a test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants