list_elements method
List elements matching the selector
Implementation
Future<Online> list_elements(AbstractSelector selector) async {
Show.action('listing', selector.selector);
await (await page).waitForSelector(selector.selector);
var elements = await (await page).evaluate('''(selector) => {
return Array.from(document.querySelectorAll(selector)).map((e) => {
return e;
});
}''', args: [selector.selector]);
Show.tree(elements, title: selector.selector);
return this;
}