Puppeteer - Page.$$('').length Returns Undefined
I was having errors with my code, so i tried to log the value in the erroneous code. So i did: const read = await page.$$('.Ns6lhs9 _gfh3').length; Then i console.log(read); For s
Solution 1:
$$
returns a promise of an element, while length
is not a promise, it's actual value.
It should be:
const read = (await page.$$('.Ns6lhs9._gfh3')).length;
Post a Comment for "Puppeteer - Page.$$('').length Returns Undefined"