2023-09-22 12:08:46 +00:00
|
|
|
---
|
|
|
|
sidebar_label: Page.screenshot
|
|
|
|
---
|
|
|
|
|
|
|
|
# Page.screenshot() method
|
|
|
|
|
|
|
|
Captures a screenshot of this [page](./puppeteer.page.md).
|
|
|
|
|
|
|
|
#### Signature:
|
|
|
|
|
|
|
|
```typescript
|
|
|
|
class Page {
|
|
|
|
screenshot(
|
|
|
|
options: Readonly<ScreenshotOptions> & {
|
|
|
|
encoding: 'base64';
|
|
|
|
}
|
|
|
|
): Promise<string>;
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
## Parameters
|
|
|
|
|
2023-12-06 08:04:56 +00:00
|
|
|
| Parameter | Type | Description |
|
|
|
|
| --------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------- |
|
|
|
|
| options | Readonly<[ScreenshotOptions](./puppeteer.screenshotoptions.md)> & { encoding: 'base64'; } | Configures screenshot behavior. |
|
2023-09-22 12:08:46 +00:00
|
|
|
|
|
|
|
**Returns:**
|
|
|
|
|
|
|
|
Promise<string>
|