pazone / ashot

WebDriver Screenshot utility. Take screenshots, crop, prettify, compare
Other
636 stars 157 forks source link

Not able to capture full screenshot after scrolling down on ubuntu using ashot #124

Open swaradewarde opened 6 years ago

swaradewarde commented 6 years ago

Hi guys, I need to take full screenshot of a web application by scrolling down. I have used Ashot to achieve same, check below code

final Screenshot screenshot = new AShot().shootingStrategy(ShootingStrategies.viewportRetina(100,0,0,2)).takeScreenshot(driver); final BufferedImage image = screenshot.getImage(); try { ImageIO.write(image, "PNG", new File(fileNameToCopy)); } catch (IOException e) { e.printStackTrace(); }

This code is working well on my local (mac osx) however when i am running same code on jenkins server (ubuntu) the screenshot captured has some background black spaces. Attaching screenshots taken on both local and on jenkins server.

Could you pls tell me what could be the issue.

Thanks in advance.

environment details with screenshots mentioned below.

Meta -

jenkins box details: OS: Linux version 4.4.0-1055-aws (Ubuntu 5.4.0-6ubuntu1~16.04.9) Selenium Version: 3.5.3 Browser: Mozilla Firefox 54.0 geckodriver: geckodriver-v0.17.0-linux64.tar.gz jenkins_ooredommappcataloguepageandroid_screenshot 1

local machine details OS: macOS Sierra Selenium Version: 3.5.3 Browser: Mozilla Firefox 54.0 geckodriver: geckodriver-v0.17.0 local_ooredommappcataloguepageandroid_screenshot

fagnerpaes commented 5 years ago

Hi @swaradewarde!

Did you get resolve that problem? Because I have be this problem too. Thanks!

Details OS: Linux version Ubuntu 16.04 Selenium Version: 3.7.1 Browser: Google Chrome 69 (Headless) chrome drive: 2.4.1