public static void fullScren(String filename) throws IOException
{
Screenshot myScreenshot = new AShot().shootingStrategy(ShootingStrategies.viewportPasting(100)).takeScreenshot(driver);
ImageIO.write(myScreenshot.getImage(),"PNG",new File("src/main/java/ScreenShots/" + filename + ".jpg"));
}
You have to use this scroll down and take full screen shot by selenium
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…