未找到Puppeteer'Page.getFrameTree'未定义

问题描述 投票:2回答:1

接收

错误:协议错误(Page.getFrameTree):未找到'Page.getFrameTree'未定义

当试图在chrome中运行puppeteer(也不是无头)时,如果删除了executablePath,它就有效。另请注意(由于某种原因)禁用信息栏不能在chrome中工作,也不设置视口

事物的版本

所以v8.9.3

Chrome版本63.0.3239.84

puppeteer v 0.13.0

AS:总是10 Pro

对于以下代码:

const puppeteer = require("puppeteer");

puppeteer.launch(options = {
args: ['--disable-infobars']
});
// ^ Also not working.
(async() => {

const browser = await puppeteer.launch({
    headless: false,
    args: ['--remote-debugging-port=9222'],
    executablePath: "C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe",
    setViewport: {width: 1920, height: 1080},
});
// ^ Viewport also isn't working

try{
    const gitPage = await browser.newPage();
    await gitPage.setViewport({width: 1024, height: 768});
    await gitPage.goto("https://github.com/login", {waitUntil: 'networkidle2'});
    await gitPage.type("#login_field", "CaptainPlanet", {delay: 100});
    await gitPage.type("#password", "NPH_Andrews", {delay: 100});
    const btnLogin = await gitPage.$("input[tabindex='3']");
    await btnLogin.click();
}catch(err) {
  console.log("error: " + err.message);
}    


})();
javascript node.js puppeteer
1个回答
2
投票

使用错误版本的铬时会发生此问题。

发行说明中包含您需要运行的铬版本,在您的情况下:

Chromium 64.0.3264.0(r515411)

https://github.com/GoogleChrome/puppeteer/releases

热门问题
推荐问题
最新问题