puppeteer/new-docs/puppeteer.elementhandle.screenshot.md
Alex Rudenko 6657364364
docs(new): migrate ElementHandle to TSDoc (#6073)
* docs(new): migrate ElementHandle to TSDoc

Co-authored-by: Alex Rudenko <alexrudenko@chromium.org>
2020-06-22 17:21:57 +02:00

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>