getByAltText

DomNode getByAltText(

  1. String altText, {
  2. bool exact = true,
})

Finds element by its alt text (for images).

Implementation

DomNode getByAltText(String altText, {bool exact = true}) {
  final results = queryAllByAltText(altText, exact: exact);
  return _getSingleResult(results, 'getByAltText', altText);
}