mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
6657364364
* docs(new): migrate ElementHandle to TSDoc Co-authored-by: Alex Rudenko <alexrudenko@chromium.org>
774 B
774 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>