Closed AvA0808 closed 2 years ago
You need to use Screenplay for this, or call Serenity.takeScreenshot() for one-off screenshots
@wakaleo I am not sure how I did not find Serenity.takeScreenshot();
in my search.
Thank you for the help, it works for what I need.
Hello @wakaleo
For my screenshots I have some lines of code in the @Step methods to: scroll the element into view, highlight it, and then un-highlight it at the end of the method.
This all works fine. The issue I am having is I can't get the screenshot to be taken on the actions inside the @Step method (on click, on type, etc.). The screen shot is taken after the @Step method so the element is not highlighted (because I un-highlight right at the end of the method).
I have tried:
take.screenshots = FOR_EACH_ACTION
(I assume action refers to .click(), .type(), etc.)@Screenshots(forEachAction = true)
to the @Step methodtake.screenshots = FOR_FAILURES
)But nothing has worked. Any suggestions on this? (is it possible to tell serenity exactly when to take the screenshot?)