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

Screenshots shifted after scrollIntoView under Linux 5.13.0-28-generic 31-Ubuntu #83

Open
Sam55555 opened this issue Feb 18, 2022 · 4 comments
Labels
help wanted Extra attention is needed Help with a PR

Comments

@Sam55555
Copy link

Sam55555 commented Feb 18, 2022

  • Node.js version: v16.13.2
  • Browser name and version: Chrome 98/latest
  • Platform name and version: Linux 5.13.0-28-generic 31-Ubuntu
  • WebdriverIO version: 7.16.14
  • wdio-image-comparison-service version: 3.1.0

Describe the bug
Screenshots shifted after scrollIntoView under Linux

To Reproduce
Steps to reproduce the behavior:

LinuxIssue.zip

@Sam55555 Sam55555 changed the title Screenshots shifted after scrollIntoView under Linux 5.13.0-28-generic #31-Ubuntu Screenshots shifted after scrollIntoView under Linux 5.13.0-28-generic 31-Ubuntu Feb 18, 2022
@wswebcreation
Copy link
Member

Hi @Sam55555

Thanks for the issue, I'm currently on vacation and will check it out when I'm back end of the month

@Kacoze
Copy link

Kacoze commented Feb 21, 2022

Same on:

  • node.js 16.13.1
  • chrome 98
  • windows 11
  • wdio 7.16.15
  • wdio-image-comparison-service version 3.1.0 AND 2.3.0
    also tested on some ubuntu (16 i think) with node 14.?.?, and same result

Also not only scroll causes this issue, but I currently did not reproduce any other trigger.

@wswebcreation wswebcreation added help wanted Extra attention is needed Help with a PR labels Aug 2, 2022
@carvalhoa-ppb
Copy link

I've also had the same behaviour on my tests.

Anytime I've made a scroll or even if the application scrolls by some iteration the screenshots created after that point of moment are shifted. Notice that the shifted amount is the same as initial scroll that application had.

After some debug I believe it's related with this line of code of webdriver-image-comparison.
As you can see we are getting top position of an element based on current viewport (getBoundingClientRect and on the moment of scrolling we are ignoring the current scroll of the page. I'm not 100% of implications of changing that line 🙏

To bypass this, until a fix appears, I'm scrolling back application to the top of the page before any checkElement after a scroll. -.-'

@christian-bromann
Copy link
Member

Thanks for reporting!

We greatly appreciate any contributions that help resolve the bug. While we understand that active contributors have their own priorities, we kindly request your assistance if you rely on this bug being fixed. We encourage you to take a look at our contribution guidelines or join our friendly Discord development server, where you can ask any questions you may have. Thank you for your support, and cheers!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed Help with a PR
Projects
None yet
Development

No branches or pull requests

5 participants