I wonder if there\'s a similar way as in Selenium to wait for text to appear for a particular element. I\'ve tried something like this, but it doesn\'t seem to wait:
The best solution you can do using waitForFunction()
(avoid weird function as string):
const selector = '.count';
await page.waitForFunction(
selector => document.querySelector(selector).value.length > 0,
{},
selector
);
Depends of the type of the text, replace value
by innerText
.
Check puppeteer API