can't get the text of input value placeholder

Hello,

I have to test a web application developped with React.
I have to check if the text of an input corresponds to a given text. I know how to do this with verifyElementText() or getText() methods.
In the html the input is as in this example:
When I use my method the result is in error: inputText.equals(‘XXXX’)

   |         |           |



   ""        false       XXXX

I don’t understand why. Even WebUI.delay(X seconds) doesn’t resolve the problem.
Thanks for any purpose.

input text is a value not a placeholder

I used getAttribute() method and then assert. It’s solved :slight_smile: Thanks @Patrick Groot

I have no experience with Katalon Studio.

but what about findElement and getAttribute?

I solved my first question with getAttrbute().
I have another one with a value entered for password: this value should be hidden by default ie instead of value, bullet points are displayed. I tried different methods to get the entered value but I get the error saying that ‘’ doesn’t match with ‘•••••’. In html I can’t see the entered value for security reasons.
So where I can get the entered value?
Thanks

Can you tell me the code you used? I also have tried the verifyElementText() or getText() methods.

We are using React as well. The web page displays that the amount listed on the element AT_Billed_Gross is 66.50.

I want to confirm with Katalon that test case checks the value in AT_Billed_Gross and validates it is in fact 66.50.

My code is:

WebUI.verifyElementText(findTestObject(‘Audit/Page_/AT_Billed_Gross’), ‘66.50’)

My error is:

2019-10-17 16:31:53.676 ERROR c.k.k.core.keyword.internal.KeywordMain - :x: Actual text ’ ’ and expected text ‘66.50’ of test object ‘Object Repository/Audit/Page_/AT_Billed_Gross’ are NOT matched. (Root cause: com.kms.katalon.core.exception.StepFailedException: Actual text ‘’ and expected text ‘66.50’ of test object ‘Object Repository/Audit/Page_/AT_Billed_Gross’ are NOT matched.