BT

Google Releases Puppeteer 1.0

| by Dylan Schiemann Follow 7 Followers on Jan 27, 2018. Estimated reading time: 2 minutes |

Puppeteer 1.0 has been released and includes dozens of improvements, including measurement of JavaScript heap and page performance, and code coverage information for JavaScript and CSS.

Puppeteer is a headless automation tool and API for Chrome and Chromium-based web browsers. Leveraging Node.js and the Chrome DevTools protocol, Puppeteer provides an alternative to Selenium WebDriver.

Beyond the typical use case of automated browser testing, Puppeteer can be used for a variety of browser automation techniques including performing repetitive tasks, scraping content, and screenshot generation. Puppeteer requires at least Node.js version 6.4, though to use many of the more modern ES2015+ APIs such as async/await, users should start with Node.js version 8.x or greater.

The project provides the hosted Try Puppeteer app as a way to quickly get started with Puppeteer.

Since its initial release, Puppeteer has been widely adopted as a simpler way to introduce automation into the developer workflow. Many developers have authored extensive tutorials and provided their feedback on working with Puppeteer.

Valentino Gagliardi, a JavaScript and React consultant, remarks in his tutorial on using Puppeteer with Jest:

Puppeteer gives you endless possibilities. A lot of folks are building new testing frameworks right now, with Puppeteer. The API could be improved, sure, but knowing the basics is a must.

Gergely Nemeth, a Node.js expert, cites the simplicity of setting up Puppeteer compared to Selenium-based tools:

However, to run Selenium tests, you need a Selenium server/cluster running locally or in the cloud, and also browser drivers to control Chrome, Firefox or any other browser. This simply has too many components, and hard to get right. Debugging tests written for Selenium can also be challenging - even simple things like grabbing the console output from test cases, slowing down tests so you can see what’s going on or intercepting requests.

Not everyone is convinced that Puppeteer is a step in the right direction. Oren Rubin, CEO at Testim.io, a machine learning test automation platform, asks if Puppeteer helps the development community or not, and points out that:

The awesomeness of Selenium is that they convinced ALL browser vendors to support the same low level API (and this took years! try convincing Apple, MS, and Google to work together), and even implemented this API in more than 10 languages (including JS).

Puppeteer's biggest limitation is that it only supports testing Chrome and Chromium-based browsers, so a Selenium-based solution is needed for automated cross-browser testing. A number of testing tools can reduce the installation challenges with Selenium driver installation, simplifying the testing and configuration process.

Rate this Article

Adoption Stage
Style

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Tell us what you think

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

There are other non selenium alternatives by Ciarán O'Neill

I'm currently trialling using TestCafe devexpress.github.io/testcafe/ which is another node based tool. It's working out great so far.

Another non selenium tool in the space, cypress.io, is promising cross browser support in the near future and looks awesome too

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

1 Discuss

Login to InfoQ to interact with what matters most to you.


Recover your password...

Follow

Follow your favorite topics and editors

Quick overview of most important highlights in the industry and on the site.

Like

More signal, less noise

Build your own feed by choosing topics you want to read about and editors you want to hear from.

Notifications

Stay up-to-date

Set up your notifications and don't miss out on content that matters to you

BT