Это последняя пробная версия кода:
Код: Выделить всё
Screenshot screenshot = new AShot().shootingStrategy(ShootingStrategies.viewportPasting(1000)).takeScreenshot(driver);
String destination = getScreenshotPath();
ImageIO.write(screenshot.getImage(), "IMG", new File(destination));
test.fail("Details: " + test.addScreenCaptureFromPath(destination));
Когда я запускаю режим отладки или просматриваю отчет, он печатается как:
Подробности: com.aventstack.extentreports.ExtentTest@62041567
и под ним битое изображение:

Подробнее здесь: https://stackoverflow.com/questions/475 ... oken-image
Мобильная версия