Find elements having attribute with given value.
Examples:
Find element with attribute 'binding' EXACTLY containing text 'fieldValue' , use:
byAttribute("binding", "fieldValue")
For finding difficult/generated data attribute which contains some value:
Find element with attribute 'binding' CONTAINING text 'fieldValue', use symbol '*' with attribute name:
byAttribute("binding*", "fieldValue") it same as By.cssSelector("[binding*='fieldValue']")
Find element whose attribute 'binding' BEGINS with 'userName', use symbol '^' with attribute name:
byAttribute("binding^", "fieldValue")
Find element whose attribute 'binding' ENDS with 'promoLanding', use symbol '$' with attribute name:
byAttribute("binding$", "promoLanding")
Find element whose attribute 'binding' CONTAINING WORD 'word':
byAttribute("binding~", "word")
Seems to work incorrectly if attribute name contains dash, for example: