

Step 8 − While working on a test, we have to add the below Puppeteer library in the code. 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. It's a shame Puppeteer doesn't support the downloads API to make the code cleaner. Because the link element has a download attribute the browser will automatically download the file rather than try to navigate to the link. Step 6 − For installation of Puppeteer core, run the below mentioned command − Once I have all the elements in place I use puppeteer to click the newly created link. Step 5 − For Puppeteer installation, run the below mentioned command − Starting from v19.0.0, Puppeteer will download browsers into /.cache/puppeteer using os.homedir for better caching between Puppeteer upgrades. 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. The details on how to install VS Code is discussed in detail in the Chapter of VS Code Configuration. Step 3 − Launch the Visual Studio Code application and click on the Open folder link and import the folder we have created in Step2. Step 2 − Create an empty folder, say puppeteer in a location. The details on how to install NodeJs is discussed in detail in the Chapter of Installation of NodeJS. The steps for installation of Puppeteer are listed below − Comparison Between Puppeteer & Protractor.Comparison Between Puppeteer & Selenium.
