selenium webdriver, Ashot() returns screenshots cropped from right side in mac OS X. Guys please help on this.

public static void takefullscreenshot() throws IOException



         Date date = new Date();


         SimpleDateFormat sdf = new SimpleDateFormat(“yyyy-MM-dd HHmmss”);

        Screenshot screenshot =new AShot().shootingStrategy(ShootingStrategies.viewportPasting(100)).takeScreenshot(driver);

        ImageIO.write(screenshot.getImage(),“PNG”, new File(System.getProperty(“user.dir”)+“/ErrorScreenshots/”+date.toString()+“_.png”));



Default Asked on June 30, 2018 in Selenium WebDriver.
Add Comment
  • 0 Answer(s)
  • Your Answer

    By posting your answer, you agree to the privacy policy and terms of service.