-
Notifications
You must be signed in to change notification settings - Fork 227
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
base: main
Are you sure you want to change the base?
Conversation
@@ -91,10 +95,24 @@ public AllureSelenide disableLogs(final LogType logType) { | |||
} | |||
|
|||
private static Optional<byte[]> getScreenshotBytes() { | |||
return ScreenShotLaboratory.getInstance().getLastThreadScreenshot() |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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?
There was a problem hiding this 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.
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