getBoundingClientRect method

  1. @override
Rectangle<num> getBoundingClientRect()
override

The smallest bounding rectangle that encompasses this element's padding, scrollbar, and border.

WebDriver only.

Implementation

@override
Rectangle getBoundingClientRect() {
  final rect = _retryWhenStale<Map?>(() => _driver
      .execute('return arguments[0].getBoundingClientRect();', [_single]))!;
  return Rectangle<num>(
      rect['left'], rect['top'], rect['width'], rect['height']);
}