Unable to enter value in textbox....


#1

Hi,
I am new to katalon recorder and getting this issue please help on this.
When I am trying to enter a value in textbox…Code is not showing any error but value is not displaying in textbox…below is the screenshot of html and recorded
code…please help.
HTML :

Recoded Step :

Code.PNG

textbox code.PNG


#2

Katalon team could you please help me on this???


#3

Hi, Avinash

Try to replace “type” command with “sendKeys” command

then it would be like:

sendKeys | id=RegoField1 | 123abc


#4

You can also try it by using setText


#5

try with
command: runScript
target: $(’#RegoFiedl1’).val(‘123abc’)


#6

abhishek kumar said:

You can also try it by using setText

Katalon Recorder has no “setText” command :wink:


#7

xio said:

Hi, Avinash

Try to replace “type” command with “sendKeys” command

then it would be like:

sendKeys | id=RegoField1 | 123abc

Hi xio…thanks for your response… I tried with sendkeys but still is not working…its clicking on textbox but not inserting value.


#8

George said:

try with
command: runScript
target: $(’#RegoFiedl1’).val(‘123abc’)

Hi George…Thanks for your response.
I tried with your suggested method and now its entering the value in textbox but when I am trying to move in to next page its giving validation error saying insert value.
Do you have any idea on this please suggest.


AAMI issue 1.PNG

AAMI issue 2.PNG


#9

Can u send a link of this form ?


#10

Thank you all for the support. We’ve released version 3.5.1 with improvements for “type” command to fix this issue.


#11

Thanks…Alex…issue got resolved in version 3.5.1 :slight_smile:


#12

Due to some conflicts with existing test cases in KR 3.5.3 we have a new command for you.

In “Vehicle Registration Number” try “setText | | 123ABC”.


#13

I am facing the same issue and I am using Katalon recorder 3.6.12. Could you please help fix this?

Background:
Using type command throws an error message " Element “id=SearchControl1_ctl04” not found.

Using the Command: runScript || Target: $(#SearchControl1_ctl04) || Vaue: sad156 (as suggested) did not throw any error but the value does not show up on the text box.

I am struck in this for a while. Can someone plz help?

PS: I will not be able to share the screen or link with which I am working on.


#14

Hmmm. Maybe try to put value to this input from console of your page with JS. If it will works it should work from Katalon as well. If it’s not work from console try too point on this field in diifrent way for example instead “document.getElemenById” use “document.getElemensByClassName” or maybe even document.evaluate.

If none of it works it’s a problem with page it self so you need to talk with developers.

I had similar issue with typing postcode to input because of validation. In my case simple JS works fine - it was something like this: document.getElementById("postcode-input-id").value("12345");


#15

The runScript command executes the JavaScript snippet in the Target field. The above code doesn’t look valid.
It looks like you are using jQuery, so try something like:

runScript | $("#SearchControl1_ctl04").val("sad156")  |

If that doesn’t work, you might need to use the window prefix to execute the code, if so try:

runScript | window.$("#SearchControl1_ctl04").val("sad156")  |

Using plain JavaScript, you could try:

runScript | document.getElementById("SearchControl1_ctl04").value = "sad156" | |

Using the setText command the syntax would be

setText | id=SearchControl1_ctl04 | sad156

and just for completeness, the type command syntax:

type | id=SearchControl1_ctl04 | sad156