puppeteer js headless mode 1

puppeteer js headless mode

const browser = await puppeteer.launch({ headless: false }); // default is true

Here is what the above code is Doing:
1. Importing the puppeteer module
2. Creating a new browser instance
3. Creating a new page instance
4. Navigating to the page
5. Waiting for the page to load
6. Taking a screenshot of the page
7. Closing the browser

Similar Posts