UI automation - type into (Single letter type into)

Hi,

This is my charArray = New Char() {‘T’, ‘o’, ‘y’, ‘o’, ‘t’, ‘a’}

I want to type each letter into the textbox but I need to do it one at a time.

Currently it gets stuck at the type into because I have EmptyField property on the type into which is Unchecked. if I dont have this unchecked it will not add the letter one at a time.

it gets stuck at the second letter and keeps on repeating the second letter due to this Warning: When the Empty field is set to None, the auto verification might fail due to preexisting text in the target field.

I have also used Send Hotkey (Ctrl + Right Arrow) but this also does not work.

Ensure the Type Into activity’s properties SimulateType or SendWindowMessages are enabled. These options often handle text input more reliably.

1 Like

Hi @Aki1111,

I would suggest converting your char array into a string first and then typing the string using type into. That way you would be able to enter all characters at once too.

Could you please try below:
str=String.Join(“”,charArray) where str is string variable defined and charArray is your character array. This would make the string “Toyota” and then you just need to use type into to type this string instead of char array. No for loop required.

Or, you can refer below video as well:

Hope this helps.

Regards
Sonali

1 Like

Hi @Aki1111

You can go 2 ways with this:

  1. Use str=String.Join(“”,charArray) to join the character array, and then Use Input mode as Simulate with Delay between keys set to anything you feel is right. This will give you the same effect as typing letter by letter. But make sure to set Click before typing to None, and Empty field to Single Line. Also, the Input mode of the Use Browser activity should also be made Simulate or Chromium.

OR

  1. Go ahead with your method of using character array, But make sure to set Input mode to Hardware or Chromium. The Empty field to None, Click before typing to Single. Then an important step (to fix the warning you mentioned), got to the 3 line button next to “Verify that…”, and click Remove verification

If this solves your issue, Do mark it as a solution.
Happy Automation :star_struck:

2 Likes

Hi there thank you so much Option 2 worked

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.