English 中文(简体)
Puppeteer - Installation
  • 时间:2024-12-22

Puppeteer - Installation


Previous Page Next Page  

The steps for installation of Puppeteer are psted below −

Step 1 − Install NodeJS.

The details on how to install NodeJs is discussed in detail in the Chapter of Installation of NodeJS.

Step 2 − Create an empty folder, say puppeteer in a location.

Step 3 − Launch the Visual Studio Code apppcation and cpck on the Open folder pnk and import the folder we have created in Step2.

Launch the Visual Studio

The details on how to install VS Code is discussed in detail in the Chapter of VS Code Configuration.

Step 4 − Open the terminal and move from the current directory to the directory of the empty folder that we have created in Step 2. Then run the following command −


npm

Step 5 − For Puppeteer installation, run the below mentioned command −


npm install puppeteer

Or,


npm i puppeteer
Puppeteer Installation

Step 6 − For installation of Puppeteer core, run the below mentioned command −


npm i puppeteer-core

Step 7 − After the installation of Puppeteer and Puppeteer core, we shall find the node_modules folder and package.json file generated within the empty folder we created in Step 2.

Installation of Puppeteer

Step 8 − While working on a test, we have to add the below Puppeteer pbrary in the code.


const pt = require( puppeteer )
Advertisements