chrome-devtools-java-client
chrome-devtools-java-client copied to clipboard
Get screenshot of a particular element
Hi,
I see that chrome dev tools has an option in commands menu to take screenshot of a specific element. I didn't find this in any of the APIs provided by dev tools protocol. I tried using the Page.captureScreenshot with the required viewport that I want, but its not working when the element is outside of view-port and requires scroll. Requesting your help on, to take screenshots of elements outside of viewport (which are visible after desired scrolling).
I see that your examples only have full screenshot example. Can u please provide an example of taking snapshot for a particular element?