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

Issues when comparing images that have been scrolled #191

Open
priceey opened this issue Apr 6, 2020 · 2 comments
Open

Issues when comparing images that have been scrolled #191

priceey opened this issue Apr 6, 2020 · 2 comments

Comments

@priceey
Copy link

priceey commented Apr 6, 2020

Hello,

I'm currently trying out ashot to take some comparison images on a website.

I have managed to make a screen shot where the page scrolls with

Screenshot entirePageScreenShot = new AShot().shootingStrategy
(ShootingStrategies.viewportRetina(100, 0, 0, 2)).takeScreenshot(driver);

However when I do

ImageDiff diff = new ImageDiffer().makeDiff(screenShotImage, libraryImagePng);

The image diff fails. Looking at the diff image, it seems there are tiny differences in the footer, which I think might be related to the scroll.

What would be the best way avoid this issue?

thanks

@Chankami
Copy link

@priceey Did you find a solution for this issue. I'm also facing the same.
Can you pls help

@puoski
Copy link

puoski commented Mar 16, 2021

@priceey I don't know if you have solved this or still need help with it, but I solved this exact problem with setting the window to point (0,0) after starting web driver. So I just used something like: driver.manage().window().setPosition(new Point(0, 0)). This removed the problem with tiny differences in the footer for me.

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

3 participants