While using Type Into Activity with Simulate Check True the bot is entering more than 20 characters, but the maximum length of the value in a specified field in an application is set to 20 characters when checked in web UI properties of that UI element. Any solution? Also I want to use SIMULATE, even if it gives an exception it will work for me.
Check string length before typing and truncate or abort?
Are u also using another “type into” after activity in which bot is typing more than 20 chars.?
If yes pls check true “Send Window Messages” , then it may work fine.
FYI, check here
We have more than 10,000 fields, so its impossible to apply this check for all.
Is there any solution in which we get an exception after that?
An exception will work for me if possible.
It wont throw an exception because it has no reason to - typing succeeds. TypeInto activity has no logic of what is a valid value and what isn’t.
What’s your processing logic? How many type into’s are actually there (hopefully not 10k)?
If field properties contain max length attributes you could read that and do a check with an invoke or custom activity. Either way you have to supply the logic somehow.
The thing is that I am getting values from a JSON file and when typing manually a particular field allows only 20 characters and when Stimulating that with Type Into it takes more than 20. So I need to make a check that the field when takes more than 20 characters it should throw an exception.
So you are saying that there is no alternative other than you mentioned above for handling this?
Depending on details there might be, although I don’t see a straightforward one.
Robot has to know somehow that the value is too long - easiest (and most time-efficient) is to check string length in memory before typing. That will be much faster than checking what the application outputs.
Without knowing how do you actually process it (input way isn’t actually that relevant, it’s how it’s typed to - loop? transaction queue? Somehow I don’t believe that there’s a form with 10k fields in it) it’s hard to give exact answers.
Maybe someone will have a better idea.