I'm trying to run this code:
var aaa = await page.$$eval(selector, list => (list, value) =>
{
return resolve(list.find(element => element.textContent === value));
}
,value);
But I received an error.
Therefore, I tried to print the items in "list" (because I assumed that the problem is there), I tried this code:
var aaa = await page.$$eval(selector, list => list);
And I received that "aaa" is empty.
Any idea what may be the problem?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…