$$eval<T> method
This method runs Array.from(document.querySelectorAll(selector)) within
the frame and passes it as the first argument to pageFunction.
If pageFunction returns a Promise, then frame.$$eval would wait for
the promise to resolve and return its value.
Examples:
var divsCounts = await frame.$$eval('div', 'divs => divs.length');
Implementation
Future<T?> $$eval<T>(
String selector,
@Language('js') String pageFunction, {
List<dynamic>? args,
}) {
return _mainWorld.$$eval<T>(selector, pageFunction, args: args);
}