getByText DomNode getByText( String text, { bool exact = true, }) Finds element by its text content. Implementation DomNode getByText(String text, {bool exact = true}) { final results = queryAllByText(text, exact: exact); return _getSingleResult(results, 'getByText', text); }