I am working with Java, TestNG, Selenium and Allure.
And I want to attach the screenshot of 'entire page' in the case of test failure.
But when using 'getScreenshotAs()' method, it attaches only the 'visible viewport' screenshot in the report. partially successful :)
@Attachment(value="Page Screenshot", type="image/png")
public byte[] saveScreenshotPNG(WebDriver driver) {
return ((TakesScreenshot) driver).getScreenshotAs(OutputType.BYTES);
}
And I am not very sure if AShot from ru.yandex.qatools could be helpful here,
As it returns Screenshot not Byte[].
Aucun commentaire:
Enregistrer un commentaire