To enable execution in the headed mode, we have to add the parameter: headless:false in the code. Step 1 − Create a new file within the directory where the node_modules folder is created (location where the Puppeteer and Puppeteer core have been installed).