我想知道是否有与Selenium类似的方法来等待特定元素的文本出现。我试过这样的事情,但它似乎没有等待:awaitpage.waitForSelector('.count',{visible:true}); 最佳答案 您可以使用waitForFunction。参见https://github.com/GoogleChrome/puppeteer/blob/master/docs/api.md#pagewaitforfunctionpagefunction-options-args包括@elena的答案完整性解决方案:awaitpag