Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to capture proper full screenshot in Chrome #96

Closed
techGen-zz opened this issue Apr 24, 2017 · 3 comments
Closed

Unable to capture proper full screenshot in Chrome #96

techGen-zz opened this issue Apr 24, 2017 · 3 comments

Comments

@techGen-zz
Copy link

I am using below code to capture screenshot in chrome but it capture same thing multiple times in screenshot. I just want to take full screenshot of page in chrome browser.

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

@RyanFromQA
Copy link
Contributor

It will be difficult to reproduce the issue without some additional information. For example, the exact code you posted (with a shorter scroll timeout) is working perfectly for me:

  • Google Chrome 57/58
  • Chromedriver 2.28
  • Mac OS Sierra/ OS X El Capitan
  • Selenium 3.3.0
  • Java 8

@nikhilkr123
Copy link

nikhilkr123 commented Jun 1, 2017

I am expecting to see a full screenshot of the web page even though browser window size is reduced. But its just taking the snap of the visible part of the browser window.

WebDriver driver = new ChromeDriver();
driver.get("https://www.google.com.au");
Screenshot screenshot = 
     new AShot().shootingStrategy(ShootingStrategies.viewportPasting(500)).takeScreenshot(driver);
ImageIO.write(screenshot.getImage(), "PNG", new File("screen.png");
driver.manage().window().setSize(new Dimension(500, 600));
  • ChromeDriver 2.28.455517
  • Selenium 3.3.1
  • Java 1.8
  • Chrome 58
  • Mac OS Sierra

@pazone
Copy link
Owner

pazone commented Jul 25, 2017

Guys, you can find the answer here: #104

@pazone pazone closed this as completed Jul 25, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants