I have in my website, a web element that is scrollable, and in my project I take screenshots of web elements for a later use. However, in this case, you need to scroll down the webpage to see the whole element, so the regular screenshot of the specific element doesn't capture the full element. Is there a way to do it? I'm running with headless chrome, and tried somehow using Ashot dependency. The limitations I have: Has to be one screenshot. Using Maven, TestNG. Code snippet:
byte[] imageResult = webElement.getScreenshotAs(OutputType.BYTES);