If you programatically set the text value of an input element and you see the value being inserted into the element but when the element loses focus the value disappears is because of security measures inplemented by the webpage to prevent bot behavior, such as programatically inserting values on elements on the web page.
Most of the time this can be overcome by initiating a change event on the element.