Screenshot scrollable div

I am trying to screenshot a page with a scrollable div using captureEntirePageScreenshot but it doesn’t scroll the div to screenshot all the content in, is there a way to do this or just screenshot the div in a single png?


Do you have an example/test page for this?

For example, the divs with overflow-y How to Make a Div Vertically Scrollable