How does VerifyElementText work? Is there another way to get the value of an element?

There’s some very old legacy code that I’m testing with Katalon Studio. Essentially, a small sample of what the code kind of looks like is this:

<script>  function calcExpirationDate() {    const signatureDate = new Date(document.getElementById('signatureDate').value);    const expirationYear = signatureDate.getFullYear() + 3;    const expirationDate = '12/31/' + expirationYear;    document.getElementById('expirationDate').value = expirationDate;  }</script><label>Signature Date </label><input id="signatureDate" onblur="calcExpirationDate()"/><br><label>Expiration Date </label><input id="expirationDate" />

I uploaded the code to a JSFiddle, and my Katalon script looks like this:

WebUI.setText(findTestObject('Page_Edit fiddle - JSFiddle/input_signatureDate'), '1/1/2000')'Page_Edit fiddle - JSFiddle/input_expirationDate'))
WebUI.verifyElementText(findTestObject('Page_Edit fiddle - JSFiddle/input_expirationDate'), '12/31/2003')

However, it keeps throwing this message:

SampleTestCase FAILED because (of) Verify element text of test object 'Object Repository/Page_Edit fiddle - JSFiddle/input_expirationDate' FAILED.(Root cause: Actual text '' and expected text '12/31/2003' of test object 'Object Repository/Page_Edit fiddle - JSFiddle/input_expirationDate' are NOT matched.)

Does VerifyElementText use the textContent instead of the value of an element? Is there another verification method I should use to get the element value?

Never mind, I guess VerifyElementText just looks at the innerText of the HTML element. I had to use VerifyElementAttributeValue method instead to look at the value attribute.