Force EmptyField to False for Background run

Hi there,

Can I overwrite the behavior of SimulateType property to not clear the field each time I insert something using Type Into activity? As with my properties set as bellow, it does NOT always run as expected (sometimes it works, sometimes it misses characters). My automation needs to work in background so it’s not an option not to use SimulateType or SendWindowMessages and I want to try to type each character in my field for testing SimulateType as I know it’s more stable than SendWindowMessages.
So, can I force/overwrite this property to NOT empty the field automatically?

Thank you!

PrankurJoshi
loginerror
lakshman
Can one of you, please help? Thank you in advance!

@claudia.kiss

You can try with Set Text activity instead of TypeInto

I believe it would misses the characters

Hope this helps you

Thanks

Thank you! We did try it, but without success.

I have noticed SendWindowsMessages rarely works as intended. It is very common for wrong characters to be entered, or for some characters to be missed.

SimulateType does NOT enter it like a human does, it will simply populate the field with your text. It also is impossible to prevent it from emptying the field. However, you can get the text existing in the field, then append that to the new text as part of your SimulateType activity.

The only way to get it 100% of the time and have it simulate the way a human would type it is to use the standard TypeInto activity without checking the SendWIndowsMessages or the SimulateType, but that requires active windows.

One thing you could try (I haven’t done it myself) is to use SendWindowsMessages, but do it in a retry loop where the condition is set to read the field, and ensure that the field property = the string you are trying to type. This shoud validate that garbage characters were not entered when using SendWindowsMessages

Thank you, Dave for your input! We did observe also that SendWindowMessages is not reliable and that SimulateType is more stable. But we have to use one of them to have our project running in background. We have an input field for Geography and after many, many tests, we noticed that pasting/typing the whole word/string (if there are multiple countries) it causes the workflow to not work as expected. When pasting the country name, suggestions must appear and sometimes the suggestions don’t appear… So, I wanted to try typing each character to have the suggestion pop up but… with SendWindowMessage not always I get full characters from a country name, sometimes misses one or more and I receive bad suggestions for countries. And if I use SimulateType then it will empty the field after each character inserted (from a country name string).

I see two elements here

-Write text to a cell without overwriting existing text in the cell

  • Would you consider using a get text activity before the type into activity?
  • You could get text => assign new string equal to old text and new text => write new string

-Simulate as a human types each character
*could you elaborate on that pleasee

2 Likes

Assuming you have Europe and France, 2 countries (for ex.) and you have to take each country from this array and insert each string into a field. After each insert (using Type Into or Set Text) a list of suggestions appear bellow this field input and then I click on first suggestion. And move to next country (I’ll put a screenshot). This part (as the whole workflow) needs to work in background so we used SendWindowMessages or SimulateType. As we noticed that it does not work correctly with neither one, I wanted to take each country name and instead of pasting the whole country name, I would type each character from it. But, using these properties for running in background, it does not work for SimulateType or it’s not reliable for SendWindowMessages as it does not always inserting the correct character (passing over). I was thinking to force this property SimulateType to not clear the field so I can have each character in a row, as SimulateType is more stable.

1 Like

Not always getting the suggestions to be able to click on the actual country.
Capture1 Capture2

I don’t think I can make use of get text unless I try it with retry loop as suggested above. If you do have other suggestions, please share with us.

Much appreciated for both of you! I hope I was clear with our problem but ask me if not.

Thank you!

If someone wants to give it a shot, I suggest trying on this form (I spaced the URL as I can’t put the whole link - directly accessing is not allowed)
https:// www.jqueryform. com/help/demo/autocomplete-multiselect/form.html

Thank you!

I tried accessing the link and it still didn’t work for me. I tried navigating, but couldn’t figure it out as I’m unfamiliar with the site.

Based on your screenshots + you saying you always want the first suggestion, can you utilize hotkeys and/or just pressing the enter key instead? If you cant use that, then will it work if you fill out the form 99% with SimulateType, then use another TypeInto activity (without erasing field) and use the SendWindowsMessages property for the very last character to make the suggestion populate?

Yes, you are right! Ok, this should be good then:


and click on “Demo: Autocomplete with MultiSelect”

@claudia.kiss You are going to either love this or hate this but I hope its the former :slight_smile:
I found a way to perform what you are trying to accomplish but not in the way you asked (Still worked as a background process!!) Instead of using type into I am using the Click activity and tying the aaname to my selected country.

Note- The attached file uses SendWindowMessages but it will also work with SimulateClick

Alternate Strategy - Force EmptyField to False for Background run.xaml (10.5 KB)

Cheers Y’all! Mystery solved? Perhaps. And PLEASE let me know if this works for you on your target site as well as the jQueryForm site.

image