maybe_click method
Implementation
Future<Online> maybe_click(AbstractSelector selector,
{bool show = true, int index = 0}) async {
try {
if (show) Show.action('clicking', selector.selector);
var selected = selector is XPath
? await (await page).waitForXPath(selector.selector,
visible: true, timeout: minimal_timeout)
: await (await page).waitForSelector(selector.selector,
visible: true, timeout: minimal_timeout);
if (selected != null) {
await selected.click();
}
} catch (e) {
if (show) Show.error(e.toString());
}
return this;
}