Skip to content

Allure .step and .attach is causing screenshots to link at end of the report while annotation step is adding screenshot below the step #2545

Closed Answered by baev
krishtoautomate asked this question in Questions & Support
Discussion options

You must be logged in to vote

You can use the attachments meta steps feature. Wrap each attachment method with a lambda step, and make sure the step name is the same as the attachment.

Allure.step("screenshot", () => {
    Allure.addAttachment(
        "screenshot",  
        new ByteArrayInputStream(((TakesScreenshot) driver).getScreenshotAs(OutputType.BYTES))
    );
});

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by baev
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #2517 on May 08, 2024 08:57.