×
☰ See All Chapters

How to install Puppeteer

In this tutorial you will learn the steps and configurations of Puppeteer installation. Puppeteer installation involves below 3 installation steps.

  1. Node.js installation 

  2. puppeteer installation 

  3. puppeteer-core installation 

In the next chapter you will learn to execute sample puppeteer test case.

Node.js inatallation

  • Node.js is an open-source framework that provides the packages and basis for puppeteer installation. 

  • Node.js provides a vast number of JavaScript projects and it's been ported to run on every common operating system and processor. 

  • To download the installer, go to https://nodejs.org/en/download/  and select the option that best suits your development system. We have downloaded “node-v12.16.2-x64.msi” for windows operating system. 

  • Node.js is provided through the MIT License. This means it can be used in both open-source and proprietary projects. 

  • The installation of Node.js includes a command-line utility called npm (this may be npm.cmd on Windows or just npm on Mac OS/Linux systems). No matter what operating system we use, npm is required to install the Puppeteer. 

  • Make sure you can execute npm on a command line. If you can't, find the npm utility and add its directory to your PATH variable. 

  • Below are the installation steps of Node.js 

puppeteer-installation-0
 
puppeteer-installation-1
 
puppeteer-installation-2
 
puppeteer-installation-3
 
puppeteer-installation-4
 
puppeteer-installation-5
 
puppeteer-installation-6
 

Once installtion is complete, open command prompt and type npm, you should see the result as below:

puppeteer-installation-7
 

Puppeteer installation

Execute the below command from command prompt

npm i puppeteer

puppeteer-installation-8
 
puppeteer-installation-9
 

Puppeteer Core installation

Execute the below command from command prompt

npm i puppeteer-core

puppeteer-installation-10
 
puppeteer-installation-11
 

After puppeteer and puppeteer-core installation you should see the node_modules directory and package-lock.json file in the directory where you have executed npm commands.

puppeteer-installation-12
 

All Chapters
Author