Unfortunately, you are at the mercy of the DOM in these cases. input elements do not always contain an attribute that holds the current value of the field, nor are they required to. In my experience, the actual value can be found in a number of places, depending on the DOM:
1.) The value attribute.
2.) A child text node.
3.) Some other element that’s a near relative, like a span sibling, for example.
Every DOM is different, so you will need to take a different approach depending on your case. A couple of tips:
2.) Try and save the HTML of the page and open in a text editor, then conduct a find for the text “demo”, to see if the value is indeed being held somewhere else in the DOM.
Hope this helps!