为什么我不能在浏览器中加载Chrome?我得到了错误:
消息未能启动浏览器进程!产卵/应用程序/GoogleChrome.app ENOENT故障排除:https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md
节点版本13.12.0
const browser = await puppeteer.launch({executablePath:'/Applications/Google\Chrome.app'});
const page = await browser.newPage();
await page.goto('https://my.gumtree.com/login', {waitUntil: 'networkidle2'});
const myButton = await page.$('#google-sign-in-button');
myButton.click();

发布于 2020-09-26 17:11:23
如果你想用已经安装好的时间启动木偶机,你需要设置executablePath。所以请查一下准确的路径。
然后,您可以找到executablePath.
。
const browser = await puppeteer.launch({executablePath:'your executable Path'});
const page = await browser.newPage();
await page.goto('https://my.gumtree.com/login', {waitUntil: 'networkidle2'});
const myButton = await page.$('#google-sign-in-button');
myButton.click();
https://stackoverflow.com/questions/64078449
复制相似问题