You are right to be confused - it’s not your fault.
Firstly, In automation testing, you normally don’t (and strictly speaking, shouldn’t) set them - simple reason, regular users can’t set attributes so why should your automation code ever need to?
However, the value
property (which is not the same as the value
attribute) is set via setText
(like I said, poor API naming choices) and is read back using *ElementAttribute
APIs as you’ve seen.
So when you think you’re getting the value of the value
attribute using verifyElementAttributeValue, you’re not - you’re getting the value of element’s value
property.
Messy? Oh yeah. Hence…