I read that puppeteer uses the latest version of chrome with it, where can I find which version it is using?
I don't want to access navigator object on the window to get it. Basically nothing runtime. Just want to know if puppeteer as a package lists out its dependency somewhere
Basically, I want to look up what all CSS and javascript support I can assume to be there from other sites like 'can I use' or chrome references.
Open your Chrome browser. At the top of your Chrome browser, to the right of the address bar, click the More icon ( ). At the bottom of the menu, click Help, then About Google Chrome.
Puppeteer uses Chrome DevTools protocol and the debugger protocol for Selenium is JSONWire. Both are used to perform clicks.
By default, Puppeteer downloads and uses a specific version of Chromium so its API is guaranteed to work out of the box. To use Puppeteer with a different version of Chrome or Chromium, pass in the executable's path when creating a Browser instance: const browser = await puppeteer.
Use the browser.version()
function to find out during runtime which version is used.
If you have the page
object you can use it like this:
const version = await page.browser().version();
To find out which Chromium version is bundled with the puppeteer version without starting, you should check out the release notes, there is always a section about the Chromium version which is used.
Example (taken from release notes from v1.14.0):
Big Changes
- Chromium 75.0.3738.0 (r641577)
You can run this in node if you are in the root of your project (the same level as your node_modules dir)
(async()=>{const x = require("puppeteer"); console.log(await(await(await x.launch()).newPage()).browser().version())})()
My Result:
> HeadlessChrome/91.0.4469.0
I find this method easier since you can run it on your server without doing file manipulations.
(Assuming you can't use top level async await)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With