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[].
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…