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

ShootElement: for scrollable div within iframe, scrolls element but screenshot is incorrect #80

Open
roboaks opened this issue Aug 13, 2020 · 1 comment

Comments

@roboaks
Copy link

roboaks commented Aug 13, 2020

Use this fiddle to confirm.

My unit test activates the result iframe and then uses shootElement for #VerticallyScrollableDiv.

Here is the result:
ScrollableElement

@glibas
Copy link
Member

glibas commented Aug 17, 2020

Currently shutterbug supports screenshots of scrollable frames and elements (as per snippets below) but not the elements in the
frames. Leaving in the backlog for future enchancement.

Frame screenshots

  • Take screenshot of scrollable frame locatable by supplied frameID:
Shutterbug.shootFrame(driver, "frameID", CaptureElement.FULL_SCROLL).save();
  • Take screenshot of scrollable frame web element:
Shutterbug.shootFrame(driver, frameWebElement, CaptureElement.FULL_SCROLL).save();

Please note that currently full scrollable frame screenshot is only possible
when the full frame is visible in the viewport. If frame size is greater
than viewport size UnsupportedOperationException will be throws suggesting
to use CaptureElement.VIEWPORT instead.

Scrollable WebElements screenshots

  • Take screenshot of scrollable web element. Horizontal capture only:
Shutterbug.shootElement(driver, webElement, CaptureElement.HORIZONTAL_SCROLL).save();

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants