puppeteer 设置窗口大小

发布于

使用 launch传参的 args: [] 中设置 `--window-size:` 无效时试下下面这个参数。 defaultViewport参数
const browser = await puppeteer.launch({
defaultViewport: {
width: 375,
height: 800,
hasTouch: true,
isMobile: true,
deviceScaleFactor: 3,
},
}); 或 匿名发表评论
找到 0 条评论