如何检测与木偶一起使用的Chrome版本? [英] How to detect version of chrome used with puppeteer?
问题描述
我读到木偶戏使用了最新版的chrome, 我在哪里可以找到它正在使用的版本?
I read that puppeteer uses the latest version of chrome with it, where can I find which version it is using?
我不想访问窗口上的导航器对象来获取它.基本上没有运行时.只想知道puppeteer作为一个软件包是否在某个地方列出了它的依赖性
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
基本上,我想从其他网站(例如我可以使用"或chrome引用)中查找所有可以支持的CSS和javascript支持.
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.
推荐答案
使用 browser.version()
函数,用于在运行时查找使用哪个版本.
Use the browser.version()
function to find out during runtime which version is used.
如果有page
对象,则可以这样使用它:
If you have the page
object you can use it like this:
const version = await page.browser().version();
要弄清哪个Chromium版本与puppeteer版本捆绑在一起而没有开始,您应该查看发行说明,总会有关于Chromium版本的章节.
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.
示例(摘录自 v1的发行说明. 14.0 ):
重大变化
- 铬75.0.3738.0(r641577)
Big Changes
- Chromium 75.0.3738.0 (r641577)
这篇关于如何检测与木偶一起使用的Chrome版本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!