Hello Everyone!. I am called Godwill from trycoder.com. Today, we are going to talk about Google puppeteer. Have you ever heard about it?.
If this is your first time, then welcome to the mind-blowing features of Puppeteer.
Puppeteer is really an amazing tool.
What is it all about?
According to the developers of Puppeteer, it is a “Puppeteer is a Node library which provides a high-level API to control headless Chrome or Chromium”.
This basically means anything that can be done with a normal browser can be done with Google puppeteer.
Headless meaning, you won’t actually see a chrome window opening, but things happen at the background.
Isn’t it awesome! ☺
You might be wondering, what exactly can this puppeteer do?
Well, as mentioned earlier, think of the things you normally do in a browser like;
- Submitting forms
- Typing
- Checking a website’s mobile view via dev tools
- Opening websites
- Generate screenshots, PDF and much more...
And guess what!, Puppeteer can do all this heedlessly (without opening a physical browser).
As the name implies, Google Puppeteer meaning it was developed by Google and is maintained by Google. Puppeteer is just one of the amazing web tools Google has developed.
Website: https://developers.google.com/web/tools/puppeteer
Installation
Puppeteer is useful not only in Node JS world but also in other languages like Python.
In this writeup, I will show you how install puppeteer with Node JS via npm (node package manager).
Navigate to your project directory in a command prompt window and type the command below as shown from npmjs.com:
Puppeteer will be downloaded and installed in your local machine. This requires internet and has a size of about 280 MB on windows.
Downloading Puppeteer may take some time and you will get notified when it is complete.
Make sure you install this in your project directory since it may or may not be installed globally (no idea!).
More about installation can be read on: https://www.npmjs.com/package/puppeteer
To check if installation was successful, navigate to the directory where you installed Puppeteer in a command window and type the command below:
As you can see, the command above checks the version of puppeteer installed which is v12.18.4 installed in my computer as of now. You may actually have an update installed in your computer.
Finally! guys, we are now set and ready to use Puppeteer.
Watch out for our next tutorial as we shall use puppeteer to do all that was mentioned at the beginning of this tutorial.
Thank you for reading.
Comments
Post a Comment
Please do not enter any spam link in the comment box.