findElements method

  1. @override
List<WebElement> findElements(
  1. By by
)
override

Find multiple elements nested within this element.

Implementation

@override
List<WebElement> findElements(By by) {
  final ids = _client.send(
      _handler.elementFinder.buildFindElementsRequest(by, id),
      _handler.elementFinder.parseFindElementsResponse);

  final elements = <WebElement>[];
  var i = 0;
  for (final id in ids) {
    elements.add(WebElement(driver, _client, _handler, id, this, by, i++));
  }

  return elements;
}