How to clear text field by simulationType property

Hi,

I want to clear the text field in the web using type into activity, also I don’t have any intention to type it over. Just I want to clear the text fields by using simulation click. I tried using simulation type property. I didn’t get any solution. Please help me to clear this.

There are several ways to clear the text fields.

  1. In Type into activity, by giving String.Empty into the text field we can clear it. But this can be performed without simulation click.

  2. We can use send hotkey to clear it by Ctrl + A and Back. But we need two send hotkey activity to do that. I don’t want to use send hotkey, because I have hundreds of text fields to clear.

I am specifically asking for the simulation type because my target machine’s screen will be locked. If I don’t use simulationType property then I will get an error like “Timeout reached”.

Uipath Studio Version: 2019.6.0 Community Edition
Packages Version: Everything is up to date with Uipath Studio Version
Orchestrator Version: Orchestrator 2019.6.0-CE.0
Robot Type: Unattended

Thanks

hello @kuppu_samy

have you tried empty field property of type into Activity

Thanks

Hi @sandeep13

I have checked. It’s not emptying the text field by using simulateType property. For your reference, I have attached the demo workflow file of ACME-Test Portal ClearText.xaml (6.9 KB) .

I have no intention to type after clearing the text field. Kindly help me to clear the text field using simulationType property.

Thanks

hello @kuppu_samy
i have no idea what is the purpose of this.
ClearText.xaml (7.4 KB)
but i have a solution

  1. replace string.empty with " " (either directly or store in a variable)
    2)then if you want checked that value in another place use trim method before checking

Thanks

2 Likes

Hi @sandeep13

Yes, It clears the existing text.

I am doing an automation of editing form fields. For that I have to clear the text fields. If I use " ", then I will get a validation error in the web while submitting the form.

Please kindly suggest the another way to solve it.

Thanks

hello @kuppu_samy
you use SendWindowMessages instead of Simulate Type
after that, it’s working through backspace hot key and val.replace(" “,”")
ClearText.xaml (7.5 KB)

Thanks

2 Likes

Hi @sandeep13

Thanks for your support!

SendWindowMessages property works fine even the target machine is get locked.
In addition to that use String.Empty instead of creating variables ClearText.xaml (6.7 KB) .

2 Likes

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