Set Text function not inputting all text

I’m attempting to enter some text into a field with the Katalon .setText method, however it is not inputting the entire string. Sometimes it puts half the string, other times just a few characters and almost never the entire string. Has anyone seen this or know why it could be happening?

Browser: Chrome
System: Mac OS

Hi Justin,

Can you provide some screenshots regard to this issue? What is your web application under test? What is your current browser version and Katalon Studio version?

Perhaps this might help: I’ve had a similar problem like this before and for me it was a timing issue. Katalon would start writing but since the field was not completely loaded it would only actually write the last few characters of the input.
We solved it by adding a small delay before the settext.

Try Thread.sleep(500) for 1/2 second delay

Using Thread.sleep is not a good practice here. You should use ‘Wait’ keywords such as ‘Wait For Element Present’ in this case

1 Like

Justin Harper said:

I’m attempting to enter some text into a field with the Katalon .setText method, however it is not inputting the entire string. Sometimes it puts half the string, other times just a few characters and almost never the entire string. Has anyone seen this or know why it could be happening?

Browser: Chrome
System: Mac OS

It happens the same to me with ‘{’

Occurs when Katalon performs setText and the text contains the character {. Write everything except {

I think it’s the windows keyboard configuration

I’m just wondering if you see the same problems if you use sendKeys in place of setText. Since no real user can use setText and we’re trying to mimic user behaviors, I favor using sendKeys over setText.

On the other hand, if I have an issue with KS/WebDriver accessing a problem input control, I use JavaScript…

with send]Key or setText the same thing happens.
I agree with using sendKeys

That’s strange. I don’t suppose escaping the “{” would help…

WebUI.sendKeys(to, “something \{ like this”)

Even I am facing the same issue. For almost all the input fields on the webpage i could see this issue. I have seen the comments above to use small delay but i dont think this is a proper solution to do this. Can anyone let me know if we have fix for this or any other workaround ?

Solution that worked for me:

Right before sending your value send “”
ex:
WebUI.delay(1)
WebUI.sendKeys(findTestObject(‘Text_Field’), “”, FailureHandling.STOP_ON_FAILURE)
WebUI.sendKeys(findTestObject(‘Text_Field’), “Text I want to input”, FailureHandling.STOP_ON_FAILURE)

You’re welcome everybody from the future, love /r/programming

1 Like

I am having the same issue mentioned above and have tried using the send key function but still the text is not inputting completely. For eg : in my case is the postal code . Sometimes it displays the first 3 characters only , sometimes the first 3 and the last (V3N 7). Can anybody provide the solution plz.

This worked for me:
http://forum.katalon.com/t/how-to-slow-down-text-input-for-slower-systems