6657364364
* docs(new): migrate ElementHandle to TSDoc Co-authored-by: Alex Rudenko <alexrudenko@chromium.org>
25 lines
774 B
Markdown
25 lines
774 B
Markdown
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
|
|
[Home](./index.md) > [puppeteer](./puppeteer.md) > [ElementHandle](./puppeteer.elementhandle.md) > [screenshot](./puppeteer.elementhandle.screenshot.md)
|
|
|
|
## ElementHandle.screenshot() method
|
|
|
|
This method scrolls element into view if needed, and then uses [Page.screenshot()](./puppeteer.page.screenshot.md) to take a screenshot of the element. If the element is detached from DOM, the method throws an error.
|
|
|
|
<b>Signature:</b>
|
|
|
|
```typescript
|
|
screenshot(options?: {}): Promise<string | Buffer | void>;
|
|
```
|
|
|
|
## Parameters
|
|
|
|
| Parameter | Type | Description |
|
|
| --- | --- | --- |
|
|
| options | {} | |
|
|
|
|
<b>Returns:</b>
|
|
|
|
Promise<string \| Buffer \| void>
|
|
|