How to get the text of input field by Katalon recorder?

Hi guys,

I am a beginner of using katalon recorder to tesing a website, the requirement is get the text of a input field, like this


on the above picture, I want to get the text before these input field, such as html “id=money”, I want to get the text before it “转账金额”, how can I to realize the requirement?


Thanks

For the object, id=money, have you tried to use getAttribute("value")?

If this doesn’t work, then you may have to create an object that has a link to where the text is located:
id("money")/../preceding-sibling::td

and then use getText()

Thanks for your answer, there are two questions:

  1. where should I use the command “getAttribute(“value”)”? because katalon recorder seems like not having the command
  2. when to create a new object? recording?

Katalon Recorder is based on Selenium. I gave you the Selenium command. However, the following video may help in your request.

Hi, I’m currently facing this same issue. I just want to know if the getAttribute command worked for you. I’ve tried both storeText and getAttribute but it still couldn’t extract the test from the input field

If you right click on your object and then select “Inspect” from the pop-up, the web page’s HTML will appear. If you do this a second time, your specific object’s HTML will appear. Select your object and then look for the Properties tab below the HTML. Look through the “Properties” and see if what you want shows in one of the “Properties”. Is that the same Attribute you were using?

If “Inspect” does not show in the pop-up, then use the F12 key and open Dev-Tools. Use the top left icon to inspect your object’s HTML, or use CTRL + SHIFT + C and click on your object.

Also, do you have a wait or delay before you try to get your information to ensure the information is there? Then you can use storeAttribute.

Hi, I’m actually the one that started this post not too long ago, asking the same question I asked at this post. We can continue this discussion there.