Did you know that our entire browser applications could be automated?

Puppeteer is one such awesome library. It is built on node.js and provides a clean API to control google’s chrome/chromium browsers.

The software automation industry has seen an amazing evolution in recent years! You might have heard about the good old Selenium for browser automation. If you haven’t , go check it out right now because it all started from selenium :)

These are the days where we have so many options to automate our browsers, write integration & end-to-end tests.

Let’s talk about puppeteer, As their official site states -

Puppeteer is a Node library which provides a high-level API to control Chrome or Chromium over the DevTools Protocol. Puppeteer runs headless by default, but can be configured to run full (non-headless) Chrome or Chromium.

It gives us the power to control almost entire chrome browser, we could use it for automating our web applications regardless of which front end framework/technologies(Angular/React/Vue etc) our app is built on.

The key differences between Selenium and Puppeteer -

Facebook Birthday CLI — An Interactive Command Line Interface for wishing your facebook friends

So now we have seen and understood about puppeteer and how it is different from other automation tools. I used it to build a small command line utility which would automate the process of wishing our friends on Facebook.

This tool would also display all our friends having birthday’s on the current date and would also allow us to choose a particular friend from the command line and wish them custom birthday wishes.

History : This project was started 2 years back as a fun project when I started learning automation. Due to work & personal commitments I could never finish it so now I got sometime and gave it the closure it needed!

Before we go and look on how it works let’s discuss the tech stack used for building this tool.

Tech Stack