score:2

Accepted answer

Technically speaking this a missing feature on the Linq methods. It's not so simple to code Async Linq functions.

On the other side, I find this much more simple to implement straight in javascript. Why? because you can test your script in your browser and then just move it to your C# code.

For instance, this method will find all li elements, find the li with a span with the text fire and then click the input.

await page.EvaluateFunctionAsync(@"() => {
     Array.from(document.querySelectorAll('li'))
         .find(l => l.querySelector('span').innerText === 'fire').querySelector('INPUT').click();
}");

Related Articles