☰ 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.
Node.js installation
puppeteer installation
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
Once installtion is complete, open command prompt and type npm, you should see the result as below:
Puppeteer installation
Execute the below command from command prompt
npm i puppeteer
Puppeteer Core installation
Execute the below command from command prompt
npm i puppeteer-core
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.
All Chapters