2022-07-05 13:41:43 +00:00
|
|
|
---
|
|
|
|
sidebar_label: Page.screenshot
|
|
|
|
---
|
|
|
|
|
|
|
|
# Page.screenshot() method
|
|
|
|
|
2023-09-21 19:21:12 +00:00
|
|
|
Captures a screenshot of this [page](./puppeteer.page.md).
|
2023-03-30 11:54:00 +00:00
|
|
|
|
2022-10-24 07:07:05 +00:00
|
|
|
#### Signature:
|
2022-07-05 13:41:43 +00:00
|
|
|
|
|
|
|
```typescript
|
|
|
|
class Page {
|
2023-09-21 19:21:12 +00:00
|
|
|
screenshot(
|
|
|
|
options: Readonly<ScreenshotOptions> & {
|
2023-01-18 14:06:20 +00:00
|
|
|
encoding: 'base64';
|
|
|
|
}
|
|
|
|
): Promise<string>;
|
2022-07-05 13:41:43 +00:00
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
## Parameters
|
|
|
|
|
2023-11-29 12:06:05 +00:00
|
|
|
| Parameter | Type | Description |
|
|
|
|
| --------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------- |
|
|
|
|
| options | Readonly<[ScreenshotOptions](./puppeteer.screenshotoptions.md)> & { encoding: 'base64'; } | Configures screenshot behavior. |
|
2022-07-05 13:41:43 +00:00
|
|
|
|
|
|
|
**Returns:**
|
|
|
|
|
2023-01-18 14:06:20 +00:00
|
|
|
Promise<string>
|