Test a number formated in a field with Katalon Recorder


I stored in a variable the number 2500000.55
In an input field of a form I insert the value of the variable defined above. When the value is inserted, it appears with this format: 2 500 000.55.
I tried to use javascript in the step of Katalon Recorder for testing the format but it’s not working.

Could you please help me to find the best way to test the correct display of this value in the form.

Thanks in advance for your help


Can you provide me with the sample test case, screenshots, gifs or videos? It’s hard to tell what’s going on otherwise.

Hi @ThanhTo ,
Sorry for the delay.
There an example, I filled the field amount with the value 5000.95 and It appears with this format in the field 5 000.95

Same with the value 23459000.69, it appears 23 459 000.69:

I don’t know exactly how to format in the test step

I find the way for checking that in the format that I want: 23459000.69 should come 23,459,000.69

parseFloat(amount).toFixed(2).toString().replace(/(\d)(?=(\d{3})+(?!\d))/g, '$1,')