scrollIntoView method

  1. @override
Future<void> scrollIntoView()
override

Scrolls this element into view.

Implementation

@override
Future<void> scrollIntoView() async {
  try {
    await _retryWhenStale(() =>
        _driver.execute('arguments[0].scrollIntoViewIfNeeded()', [_single]));
  } on sync_wd.JavaScriptException {
    await _retryWhenStale(
        () => _driver.execute('arguments[0].scrollIntoView()', [_single]));
  }
}