mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
docs: fix screenshot guide (#12451)
This commit is contained in:
parent
637e82796b
commit
6dd3aa7241
@ -1,6 +1,6 @@
|
||||
# Screenshots
|
||||
|
||||
For capturing screenshots use [`Page.screenshot()`](https://pptr.dev/api/puppeteer.screenshot.pdf).
|
||||
For capturing screenshots use [`Page.screenshot()`](https://pptr.dev/api/puppeteer.page.screenshot).
|
||||
|
||||
```ts
|
||||
const browser = await puppeteer.launch();
|
||||
@ -9,7 +9,7 @@ await page.goto('https://news.ycombinator.com', {
|
||||
waitUntil: 'networkidle2',
|
||||
});
|
||||
await page.screenshot({
|
||||
path: 'hn.pdf',
|
||||
path: 'hn.png',
|
||||
});
|
||||
|
||||
await browser.close();
|
||||
|
Loading…
Reference in New Issue
Block a user