selenium 附件位于诱惑结果文件夹中,但未显示在诱惑报告中

6za6bjd0  于 2022-12-18  发布在  其他
关注(0)|答案(1)|浏览(114)

运行测试时,附件在诱惑报告中生成,但未在诱惑报告中显示
this is allure report folderhere is method to take screenchot please refer allurecapture method, i have tried it without annotation alsothis my report
here i am calling the method
我已经尝试捕获屏幕截图并将其添加到诱惑报告中。我已经在实用程序包中创建了静态的allurecapture()方法,并在ontestsuccess()方法中对其进行了校准。
附件在诱惑报告文件夹中,但在诱惑报告中没有。有时它会出现,但大多数情况下不会。
我曾尝试只作注解。

@Attachment
    public static byte[] allurescreencapture(String screenshotname) {
        return ((TakesScreenshot)driver).getScreenshotAs(OutputType.BYTES);
    }
rqcrx0a6

rqcrx0a61#

遇到了同样的问题。在github https://github.com/allure-framework/allure-java/issues/784中发现了问题。
降级依赖版本对我很有效。

<aspectj.version>1.9.5</aspectj.version>
<allure-testng.version>2.15.0</allure-testng.version>
<testng.version>7.4.0</testng.version>

相关问题