findElement method Null safety

  1. @override
WebElement findElement(
  1. By by
)
override

Search for an element within the entire current page. Throws NoSuchElementException if a matching element is not found.

Implementation

@override
WebElement findElement(By by) => WebElement(
    this,
    _client,
    _handler,
    _client.send(_handler.elementFinder.buildFindElementRequest(by),
        _handler.elementFinder.parseFindElementResponse),
    this,
    by);