750 B
750 B
Home > puppeteer > ElementHandle > screenshot
ElementHandle.screenshot() method
This method scrolls element into view if needed, and then uses Page.screenshot() to take a screenshot of the element. If the element is detached from DOM, the method throws an error.
Signature:
screenshot(options?: {}): Promise<string | Buffer | void>;
Parameters
Parameter | Type | Description |
---|---|---|
options | {} |
Returns:
Promise<string | Buffer | void>