# Puppeteer [Puppeteer | Puppeteer](https://pptr.dev/) > Puppeteer is a JavaScript library which provides a high-level API to control Chrome or Firefox over the [DevTools Protocol](https://chromedevtools.github.io/devtools-protocol/) or [WebDriver BiDi](https://pptr.dev/webdriver-bidi). Puppeteer runs in the headless (no visible UI) by default Chart.js や [[WASM|WebAssembly]] も問題なかった。 ## CLI [JarvusInnovations/puppeteer-cli: A general command-line wrapper for puppeteer. Currently only supports one command—`print`—to render a local/or remote HTML file to PDF. Aims to be a easy replacement for the deprecated wkhtmltopdf.](https://github.com/JarvusInnovations/puppeteer-cli) ```sh puppeteer screenshot "http://localhost:3000" screenshot.png --cookie "session:xxxxxxxx" --wait-until "networkidle0" --viewport 1280x800 ``` 試してない。 [Puppeteer を CLI で動かす Docker イメージ作った - 病みつきエンジニアブログ](https://yamitzky.hatenablog.com/entry/2017/08/22/004448) ## References - [[速習] Puppeteer ~ヘッドレスChromeでテスト&スクレイピング 記事一覧 | gihyo.jp](https://gihyo.jp/list/group/%E9%80%9F%E7%BF%92-Puppeteer-%EF%BD%9E%E3%83%98%E3%83%83%E3%83%89%E3%83%AC%E3%82%B9Chrome%E3%81%A7%E3%83%86%E3%82%B9%E3%83%88-%E3%82%B9%E3%82%AF%E3%83%AC%E3%82%A4%E3%83%94%E3%83%B3%E3%82%B0#rt:/article/2022/09/rapid-learning-puppeteer-01)