AppleScript unable to get text from safari
If it's a user input text field, it won't have an innerHTML property (or, it might, but it won't contain any meaningful data) because it's an element that can't contain child HTML elements itself.

You ought to be able to read the value property that you use to set its text content.

document.getElementsByClassName('text-entry')[1].value;