hasAttribute function
Matches if an element matching selector has attribute with value.
value can be a String for exact match, or a Matcher for flexible matching.
expect(html, hasAttribute('a', 'href', '/home'));
expect(html, hasAttribute('img', 'alt', contains('photo')));
Implementation
Matcher hasAttribute(String selector, String attribute, dynamic value) =>
_HasAttributeMatcher(selector, attribute, value);