Problem related with "set text" in a field


#1

Hello guys, I have a big problem with a field, it’s very important because of this field it’s the only one that makes me possible to finish the entire process.
Well, it’s simple, I have a Document field, the flow is the following:
Add the document + tab, it takes some moments to load the information and the rest of the fields are completed with customer information from a core.
Also, you can add the document + click in another part of the page and the load process is the same.
The problem’s that Katalon went to the last part of the document field, not to the beginning, therefore, the field isn’t completed at all, nevertheless the result of the case it’s ok.
The document is always a number…

Example >>> Document:498848 <<< At the beggining, plus tab to load information
Document: 498848 <<< What Katalon does
I try so many combinations, set text, focus and set text, mouse over and set text, sleep function with java code, and the result is always the same, the case ended ok nevertheless the field is never completed so the information from the core is not loaded and I cannot load the other mandatory fields, consequently I can’t complete the case.
Do I attach something or the example works well?
Thx guys !!


#2

When you joined, you should have read this - it will help us to help you:

In this case specifically, we’ll need to see your Test Case script and very likely the HTML for the element you are having trouble with.


#3

Hello, ok I gonna attach the screen with the information.

Also, I find some topics related to this problem, but no one has a clear solution.




#4

Third time…


#5

Dude, the script is in the image…
I already read your link post…
This is the full script (the page, user and pass are property of the company, so I put *** in the script instead).

script manual mode…

WebUI.openBrowser(‘http://*******’)

WebUI.setText(findTestObject(‘Loguear pagina/input__ctl00CphContentLoginControl1TextBoxUser’), ‘*****’)

WebUI.setText(findTestObject(‘Loguear pagina/broupasslogin’), ‘***’)

WebUI.click(findTestObject(‘Loguear pagina/input_Debe ingresar la contrasea_ctl00CphContentLoginControl1ButtonLogIn’))

WebUI.navigateToUrl(‘http://192.168.20.122/PayStudioBOClient/View/Login/LoginPage.aspx’)

WebUI.click(findTestObject(‘Object Repository/alta de cuenta 2/Page_Pgina Principal Administrador/clientes’))

WebUI.click(findTestObject(‘Object Repository/alta de cuenta 2/Page_Pgina Principal Administrador/Alta de Cuenta’))

WebUI.selectOptionByValue(findTestObject(‘Object Repository/alta de cuenta 2/Page_Alta Cuenta/dptsucursal’), ‘1’, true)

Thread.sleep(5000)

WebUI.selectOptionByValue(findTestObject(‘alta de cuenta/Page_Alta Cuenta/comboSucOrigen’), ‘114’, false)

Thread.sleep(5000)

WebUI.selectOptionByValue(findTestObject(‘alta de cuenta 2/Page_Alta Cuenta/seleccionproducto’), ‘4’, true)

Thread.sleep(5000)

WebUI.selectOptionByValue(findTestObject(‘alta de cuenta 2/Page_Alta Cuenta/gaf’), ‘2’, false)

Thread.sleep(5000)

WebUI.click(findTestObject(‘alta de cuenta 2/Page_Alta Cuenta/checkgaf’))

Thread.sleep(5000)

WebUI.click(findTestObject(‘alta de cuenta 2/Page_Alta Cuenta/siguiente’))

WebUI.waitForPageLoad(5)

Thread.sleep(5000)

WebUI.selectOptionByValue(findTestObject(‘alta de cuenta 2/selectdocumentt’), ‘1’, false)

WebUI.setText(findTestObject(‘alta de cuenta 2/ingresadocument’), ‘49887924’)

Also is not possible to attach the logs error because the case doesn’t finish with an error.

HTML from the page

app field
image


#6

@enemnogenus This happened with me on Firefox browser but for the fix was :

  • Add a click on the field where you want to enter text.
  • Then add a small delay of maybe 2 seconds
  • Then try to send text one character at a time.

#7

Myabe worth a try also


#8

Hello guys, thx for your answers.
I tried it with everything, the case still end well but is not working. The developer told me that exist some sort of “Mask” that check all the text that we put inside of the field. I have been using focus, delay, sending character one by one, mouse over + click + delay + send text
mouse over + focus+ delay + send text, etc.
Now I have no idea what to do…

Some examples…
WebUI.click(findTestObject(‘alta de cuenta 2/ingresadocument’))
Thread.sleep(2)

WebUI.setText(findTestObject(‘alta de cuenta 2/ingresadocument’), ‘4’)

WebUI.setText(findTestObject(‘alta de cuenta 2/ingresadocument’), ‘9’)
WebUI.setText(findTestObject(‘alta de cuenta 2/ingresadocument’), ‘8’)
WebUI.setText(findTestObject(‘alta de cuenta 2/ingresadocument’), ‘8’)
WebUI.setText(findTestObject(‘alta de cuenta 2/ingresadocument’), ‘7’)
WebUI.setText(findTestObject(‘alta de cuenta 2/ingresadocument’), ‘9’)
WebUI.setText(findTestObject(‘alta de cuenta 2/ingresadocument’), ‘2’)
WebUI.setText(findTestObject(‘alta de cuenta 2/ingresadocument’), ‘4’)

WebUI.selectOptionByValue(findTestObject(‘alta de cuenta 2/selectdocumentt’), ‘1’, false)

WebUI.mouseOver(findTestObject(‘alta de cuenta 2/ingresadocument’))

WebUI.focus(findTestObject(‘alta de cuenta 2/ingresadocument’))

WebUI.delay(2)

WebUI.setText(findTestObject(‘alta de cuenta 2/ingresadocument’), ‘4’)


#9

Is there a way I can access the field ? On web ?


#10

Hello and thank you again!
It’s not possible because is a local project from the company where I work(I mean, the domain is not public).
If you have the possibility to use skype I’m always available there. Through Skype I can send you videos or whatever you need.
Gratitude for your concern guys!
My skype is >> mathias.carranza@paygroup.com


#11

Now I try with this, Katalon put half of the numbers on the field.
I should find out why…
:thinking:

WebUI.delay(5)

WebUI.clickOffset(findTestObject(‘alta de cuenta 2/ingresadocument’), 40, 5)

WebUI.delay(5)

WebUI.sendKeys(findTestObject(‘alta de cuenta 2/ingresadocument’), ‘49887924’)

WebUI.delay(5)


#12

I think you have a field which is automatically trying to add space between the characters you are entering. Fields like Credit Card numbers.


#13

Hmm maybe :sweat:
So, do you see any option, if the field tries to add spaces?
Thx!


#14

One of the solution I had to send Character one at a time you have already tried. Can you add the digits manually and share what you notice in terms of entering characters manually ? Is the filed selector is getting updated in real time ?


#15

It goes till 7, I just need three more lines , what a weird behavior !!

WebUI.sendKeys(findTestObject(‘alta de cuenta 2/ingresadocument’), ‘4’)

WebUI.sendKeys(findTestObject(‘alta de cuenta 2/ingresadocument’), ‘9’)

WebUI.sendKeys(findTestObject(‘alta de cuenta 2/ingresadocument’), ‘8’)

WebUI.sendKeys(findTestObject(‘alta de cuenta 2/ingresadocument’), ‘8’)

WebUI.sendKeys(findTestObject(‘alta de cuenta 2/ingresadocument’), ‘7’)

WebUI.sendKeys(findTestObject(‘alta de cuenta 2/ingresadocument’), ‘9’)

WebUI.sendKeys(findTestObject(‘alta de cuenta 2/ingresadocument’), ‘2’)

WebUI.sendKeys(findTestObject(‘alta de cuenta 2/ingresadocument’), ‘4’)


#16

What this field is for ? Is it a Field that is supposed to follow a certain format ? Like Security Number or so ?


#17

This might be an issue:

Ask the developer(s) what it is doing.


#18

Hello, No it’s just a normal field where we put a document.
Like:
Document: FIELD to enter numbers.
How I said before, Katalon is putting 5 of the 8 numbers that I send in the script.


#19

Hello Russ, thx again, I saw this case with the developer of my company. He has more experience with Katalon and automation in General, like Selenium.
The only good thing that now I have the possibility to send at least some numbers, but is still a problem because I need to send them all the 8 numbers because if I send less the application tells me that the document doesn’t exist.
Related with the image that you attached I have no idea if is related to a bug in my app or in Katalon.


#20

The point of the image is it is YOUR image from your attachments. It shows there is a keypress event handler on the element you’re having trouble with. I would be concerned enough to investigate what that handler is doing to try to establish if it is playing some part in the problem you’re having with setText.

Putting it simply, you’re having an unusual problem with a normally working API (setText). You need to look for something unusual about that field on that page. Your developers are doing something every time a key is pressed in that field. You should at least find out what that something is.

If you don’t do that, you’re just guessing. Guessing is not good engineering.