activeElement property

Future<WebElement?> activeElement

The currently focused element, or the body element if no element has focus.

Implementation

Future<WebElement?> get activeElement async {
  final id = await _client.send(
      _handler.elementFinder.buildFindActiveElementRequest(),
      _handler.elementFinder.parseFindActiveElementResponse);
  if (id != null) {
    return getElement(id, this, 'activeElement');
  }
  return null;
}