Puppeteer 中文文档v25.8.0

Options 接口

签名

export interface ComputeExecutablePathOptions

属性

属性

修饰符

类型

说明

默认值

browser

Browser

确定要启动哪个浏览器。

buildId

string

确定要下载哪个 buildId。buildId 应唯一标识二进制文件,并用于缓存。

cacheDir

string | null

存储目录的根路径。

如果可执行文件路径应相对于解压后的下载位置,则可以将其设置为 null。例如 ./chrome-linux64/chrome

platform

optional

BrowserPlatform

确定浏览器将适用于哪个平台。

自动检测。