点击puppeteer中的某个元素后,如何等待网络空闲?const browser = await puppeteer.launch({headless: false});//Now I need wait network idle(Wait for the request complete)更新:单击元素
当我尝试通过以下方式逐个单击每个页面时,会出现错误: 我尝试过使用puppeteer的.click函数,但它给出了错误: error:执行上下文被破坏,很可能是因为导航。; page.goto(url); //this goes back to the initial page with the list of URLs
} 我想逐个单击链接并返回到上一页
目标是从加载在第5深度子框架页面中的14页中的一页中单击CreateNewShoping购物篮。该链接调用外部javascript函数,但傀儡师返回此错误:
Error: Evaluation failed: ReferenceError: create_order is not defined_evaluateInternal (<path>/headless-chrome/node_modules/puppeteer/lib/cjs
形势:1)加载页0。页0包含指向不同页面的可单击链接。我想加载所有这些页面的内容。所以:3)点击加载第2页的第二个链接。无限直到所有的链接都被点击。使用我的当前代码,页面0加载,然后单击第一个链接并加载页面1,然后出现以下错误的崩溃:
(node:2629) UnhandledPromiseRejectionWarning: Er
我有一段简单的代码it('Should launch the browser', async function:
错误:评估失败:puppeteer_evaluation_script:1:21 at ExecutionContext._evaluateInternal (node_modules\puppeteer\lib\cjs\puppeteer\common\Execution