I need to take a screenshot of a particular given dom element including the area inside scroll region. 
I tried to take a screen shot of entire web page using selenium and crop the image using Python Imaging Library with the dimensions given by selenium. But I couldnt figure out a way to capture the are under scroll region.
for example I have a class element container in my page and it is height is dynamic based on the content. I need to take screenshot of it entirely. but the resulting image skips the region inside scrollbar and the cropped image results with just the scroll bar in it
Is there any way to do this? Solution using selenium is preferable, if it cannot be done with selenium alternate solution will also do.
You can scrool with driver.execute_script method and then take a screenshot.
I scroll some modal windowns this way with jQuery:   
driver.execute_script("$('.ui-window-wrap:visible').scrollTop(document.body.scrollHeight);")
Taking screenshot of particular div element including the area inside scroll region using selenium and python