How to detect version of chrome used with puppeteer?

ⅰ亾dé卋堺 提交于 2019-12-12 09:57:07

问题


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.


回答1:


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)


来源:https://stackoverflow.com/questions/55808398/how-to-detect-version-of-chrome-used-with-puppeteer

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!