I have been able to get the value of a React field using the get.attribute code listed below. I can’t seem to get the value from a disabled field. It is returning as null. I have googled for a while and actually read some topics on this forum, but nothing just yet seems to be working for me.
I am trying to get the value of the Description field (which is disabled) and verify that it matches an expected text.
value = WebUI.getAttribute(findTestObject('Object Repository/Add Bill/Page/div_Accessorial_Description’), ‘value’)_
println('The value is: ’ + value)
WebUI.verifyMatch(value, ‘HAZARDOUS MATERIALS’, false)
2019-10-24 14:02:36.868 ERROR c.k.k.core.keyword.internal.KeywordMain - Unable to verify match between actual text ‘null’ and expected text ‘HAZARDOUS MATERIALS’ (Root cause: com.kms.katalon.core.exception.StepFailedException: Actual text ‘null’ and expected text ‘HAZARDOUS MATERIALS’ are not matched.