# How to do a screenshot using Puppeteer

> Learn how to take a screenshot with Puppeteer using the page.screenshot() method, set a path to save the file, and add the fullPage option for the whole page.

Author: Flavio Copes | Published: 2023-05-15 | Canonical: https://flaviocopes.com/how-to-do-a-screenshot-using-puppeteer/

When you have created a Puppeteer `page` object:

```javascript
const page = await browser.newPage()
```

You can use the `screenshot()` method on it to save to `screenshot.jpg` in this case:

```javascript
await page.screenshot({
  path: 'screenshot.jpg'
})
```

Add the `fullPage` option to screenshot the whole page:

```javascript
await page.screenshot({
  path: 'screenshot.jpg',
  fullPage: true,
})
```

Also see my full [Puppeteer tutorial](https://flaviocopes.com/puppeteer/)
