Puppeteer is a Node library which provides a high-level API to control [headless](https://developers.google.com/web/updates/2017/04/headless-chrome) Chrome over the [DevTools Protocol](https://chromedevtools.github.io/devtools-protocol/). It can also be configured to use full (non-headless) Chrome.
* Automate form submission, UI testing, keyboard input, etc.
* Create an up-to-date, automated testing environment. Run your tests directly in the latest version of Chrome using the latest JavaScript and browser features.
* Capture a [timeline trace](https://developers.google.com/web/tools/chrome-devtools/evaluate-performance/reference) of your site to help diagnose performance issues.
> **Note**: When you install Puppeteer, it downloads a recent version of Chromium (~71Mb Mac, ~90Mb Linux, ~110Mb Win) that is guaranteed to work with the API. However, you can [tell Puppeteer to use any Chromium executable](https://github.com/GoogleChrome/puppeteer/blob/master/docs/api.md#new-browseroptions) installed on the machine.
Puppeteer sets an initial page size to 800px x 600px, which defines the screenshot size. The page size can be customized with [`Page.setViewport()`](https://github.com/GoogleChrome/puppeteer/blob/master/docs/api.md#pagesetviewportviewport).
Puppeteer launches Chromium in [headless mode](https://developers.google.com/web/updates/2017/04/headless-chrome). To launch a full version of Chromium, set the ['headless' option](https://github.com/GoogleChrome/puppeteer/blob/master/docs/api.md#new-browseroptions) when creating a browser:
Puppeteer is a light-weight Node module to control headless Chrome using the latest version of the [DevTools Protocol](https://chromedevtools.github.io/devtools-protocol/).
Puppeteer bundles Chromium to insure that the latest features it uses are guaranteed to be available. As the DevTools protocol and browser improve over time, Puppeteer will be updated to depend on newer versions of Chromium.
Since Puppeteer's code is run by Node, it exists out-of-process to the controlled Chromium instance. This requires most of the API calls to be asynchronous to allow the necessary roundtrips to the browser.
Puppeteer works only with Chrome. However, many teams only run unit tests with a single browser (e.g. Phantom). In non-testing use cases, Puppeteer provides a powerful but simple API because it's only targeting one browser that enables you to rapidly develop automation scripts.
PhantomJS uses an older version of WebKit as it's browser rendering engine. Puppeteer uses the latest
versions of Chromium, which use the Blink rendering engine.
#### Q: How is this different than Chromeless?
[Chromeless](https://github.com/graphcool/chromeless) and Puppeteer are similar projects.
Both are Node libraries that provide a high-level JS APIs to control headless Chrome.
Chromeless is intended to work well with AWS Lambda to deploy parallel testing in a serverless setup.
Under the hood, it uses [chrome-remote-interface](https://www.npmjs.com/package/chrome-remote-interface) to interface with the DevTools Protocol. In the future, it could use Puppeteer's API.
Puppeteer is smaller in size (ignoring the bundled version of Chrome) and does not use
dependencies to interface with Chrome. It's API is inspired by other popular automated testing
libraries like PhantomJS and [NightmareJS](http://www.nightmarejs.org/).
#### Q: Who maintains Puppeteer?
The Chrome DevTools team maintains the library, but we'd love your help and expertise on the project!
See [Contributing](https://github.com/GoogleChrome/puppeteer/blob/master/CONTRIBUTING.md).
#### Q: Why is the Chrome team building Puppeteer?