Reuse Selenide screenshots by dstekanov · Pull Request #440 · allure-framework/allure-java
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
- Sign Allure CLA
- Provide unit tests
| } | ||
|
|
||
| private static Optional<byte[]> getScreenshotBytes() { | ||
| return ScreenShotLaboratory.getInstance().getLastThreadScreenshot() |
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
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?
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters