Creating a Puppeteer browser
The signature of the launch
function is not launch()
, but launch(options)
. Thanks to the freedom we have in JavaScript, we can just avoid passing that argument, and the launch
function will get options
as undefined
.
Using the Puppeteer.launch function
These are all the options Puppeteer.launch
supports in Puppeteer 7 according to the official docs (https://github.com/puppeteer/puppeteer/blob/v7.0.0/docs/api.md#puppeteerlaunchoptions):
product
: Which browser to launch. At this time, this is eitherchrome
orfirefox
.ignoreHTTPSErrors
: Whether to ignore HTTPS errors during navigation. This option will become handy when you want to automate websites with invalid or missing SSL certificates. This will prevent Chromium from returning an invalid certificate page in those cases.headless
: Whether to run the browser in headless mode. Defaults totrue
unless thedevtools
option istrue
.executablePath...