Select Item - case insensitive

hi All,
may i know is there any way which we can ignore the case-sensitive when we try to select the item from a dropdownlist ?

eg. in my dropdownlist, these are the available options
- Business
- Home
- Others

but when i try to select “BUSINESS”, it throw an exception “Cannot select item. It was not found among existing items”.

thanks

Hi, @goh6613
You can change the case type of variable before entering into the select item activity
like toupper,tolower,System.Globalization.CultureInfo.CurrentCulture.TextInfo.ToTitleCase(“HELLO WORLD”.ToLower())

You also Refer below link
TextInfo.ToTitleCase(String) Method (System.Globalization) | Microsoft Learn

Regards,

Hi,
Your not suppose to make ignore case because select item is case sensitive.
So better way is to make first letter of string is capital.(as per the drop down value)
assign str= strvalue.Substring(0, 1).ToUpper() + strvalue.Substring(1).ToLower

2 Likes

hi All,
My concern is that i don’t want the dependency on the selection options.

i am thinking is there a way to do the following

  • convert the selection to all CAPS
  • convert my input to CAPS
  • then select

Thanks

Select item activity just picks up whatever the case item in the dropdown.
You can change the case from the select item and use it as the output but if you want to change as the input I guess its not possible(its like changing html client side page (j script can be done )) as I said earlier it looks for exact match in the dropdown.

May i know why your looking such requirement ? whereas above criteria matches selecting of the dropdown.

1 Like

Valid concern. Moved to Ideas.

2 Likes

So your requirement is this: “if the case for the selected item from the dropdown list changes, then the select item activity should be case insensitive and still pick up that item”. Correct? But then again some might want the activity to be case sensitive, so the idea is to make sensitivity configurable.

However, how often do you expect the dropdown you are automating to change, or dropdown items in general to change? Is this a real world scenario?

Consider your own forum tag - MirceaGrigore. If someone sends input “mirceagrigore” to a process it’s unselectable for the robot (no method can change a char in the middle of the string to upper without knowing what to change there). Only workaround would be to use FindChildren → search.

Exactly - a flag for “ignore case” would do wonders. There are fringe cases with specific cultures of text though.

Similar thing for selectors would be great too, but that’s waaaay harder/processing intensive to do than this one.

3 Likes

I’d like to see, in addition to an option for case insensitivity, a scalar value that can be used to set a selection similarity threshold amount that a given item matches something in the list of items to be selected from. Something along the lines of NLTK or wordnet similarity.

1 Like

Has the case sensitivity been removed (or optional) in latest release.
I have similar issue where the drop down can have values in any case (mixed case)
Is there a solution.

2 Likes

Hi @goh6613

Please check out these topics of recently introduced new features!