down method

  1. @override
Future down(
  1. MouseButton button, {
  2. PageLoaderElement? eventTarget,
  3. ClickOption? clickOption,
})
override

Press button on the mouse at its current location with clickOption. If eventTarget is specified, PageLoader will attempt to fire the corresponding mouse events on that target, otherwise it will fire the events on the target that is under the current mouse location. clickOption is only used for Html.

Implementation

@override
Future down(MouseButton button,
    {PageLoaderElement? eventTarget, ClickOption? clickOption}) async {
  if (clickOption != null) {
    throw UnsupportedError(
        'WebDriver PageLoaderMouse does not support `clickOption` '
        'parameter.');
  }
  if (eventTarget is WebDriverPageLoaderElement) {
    return _fireEvent(eventTarget, 'mousedown', button);
  } else {
    _driver.mouse.down(button);
  }
}