Let's say I will go to google.com then fetch all a
tags inside the page, so I write something as below
await page
.goto ("https://google.com")
.then (() => page.$$eval ("a", xs => xs.length))
.then (console.log)
this will print a number that's greater than 0, which means that xs
is an array full of <a>
html elements. Good
However once I change it to the following
await page
.goto ("https://google.com")
.then (() => page.$$eval ("a", xs => xs))
.then (console.log)
it returns undefined
??? this is weird and confusing why would it return undefined it doesn't make any sense
is this a bug or something !