mouse_over method

Future<Online> mouse_over(
  1. AbstractSelector selector
)

Implementation

Future<Online> mouse_over(AbstractSelector selector) async {
  Show.action('mouse over', selector.selector);
  var selected = selector is XPath
      ? await (await page).waitForXPath(selector.selector, visible: true)
      : await (await page).waitForSelector(selector.selector, visible: true);
  if (selected != null) {
    await selected.evaluate('''element => {
    var mouseOverEvent = new MouseEvent('mouseover', {bubbles: true});
    element.dispatchEvent(mouseOverEvent);
  }''');
  }
  return this;
}