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

Using checkFullPageScreen method, capturing images with duplicate viewport and is not scrolling to the bottom of the page #125

Open
sgantasa opened this issue Jun 20, 2023 · 2 comments
Labels
help wanted Extra attention is needed

Comments

@sgantasa
Copy link

NOTE: Be aware of the fact that this module is only a plugin that provides all functionality from webdriver-image-comparison. So please check if this is an issue with this plugin or with webdriver-image-comparison.

Environment (please complete the following information):

  • Node.js version: 12.16.3
  • NPM version: 6.14.4
  • Browser name and version: Chrome 112/latest
  • Platform name and version: Windows 10
  • WebdriverIO version: 7.6.1
  • wdio-image-comparison-service version: 5.0.3

Config of WebdriverIO + wdio-image-comparison-service
services: [
[
"image-comparison",
{
// Some options, see the docs for more
baselineFolder: join(process.cwd(), "./tests/Baseline/"),
formatImageName: "{tag}-{logName}-{width}x{height}",
screenshotPath: join(process.cwd(), ".tmp/"),
savePerInstance: true,
autoSaveBaseline: true,
blockOutStatusBar: true,
blockOutToolBar: true,
ignoreNothing: true
// NOTE: When you are testing a hybrid app please use this setting
// isHybridApp: true,
// Options for the tabbing image

},
]
]

Describe the bug
the checkFullPageScreen() does not seem to be scrolling. it takes several screenshots of the same top viewport instead of scrolling and taking screenshot.

To Reproduce
Steps to reproduce the behavior:
Access url : https://www.tangerine.ca/app/#/login/login-id
Attempt to take full page screenshot
await browser.checkFullPageScreen("TangerinloginfullPage", {
fullPageScrollTimeout: 3000,
});

Expected behavior
A screenshot of the entire page should be taken without duplicate viewport.

****Actual behavior Screen *****

TangerineloginCifPage

@webduvet
Copy link

webduvet commented Sep 8, 2023

experiencing the same. It seems to calculate the number of screenshots from the content height correctly and takes them but the methods sent to selenium getDocumentScrollHeight and scrollToPosition seem to be ignored resulting in duplicate screenshots of the top of the page.

@christian-bromann
Copy link
Member

Thanks for reporting!

It seems to me that the application itself is not scrollable but a container of it. It seems a solution to this would be to allow checkFullPageScreen to take a new parameter that points to an element for where the scrolling is suppose to happen. If element is given it should be passed into scrollToPosition.ts or handle this differently.

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!

@christian-bromann christian-bromann added the help wanted Extra attention is needed label Jan 5, 2024
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
Projects
None yet
Development

No branches or pull requests

3 participants