How to use casesensitive attribute in selectors for Select Item Activity?

For select the inputs from dropdown My Inputs are like

propery
covid
non covid
Self care

But in dropdown list these are available like

Property
COVID
Non COVID
SelfCare

Is possible to use like
casesensitive:attributename=‘false’ in the selectors of Select Item activity. And here I am unable to use any other activities to pick item from dropdown.
@loginerror @DeaTo
Thanks
Shesherao.

@shesherao.patil Case-Sensitive Selectors
I think it is possible

HI @shesherao.patil

I guess instead you can try the same property to click directly on it…

or

if it is a long list and needs a scroll…then use click surrounded by try catch with case sensitive false inside a loop in catch do the scroll using mouse scroll activity and once clicked come out of loop

cheers

Hi,

Can you try the following steps?

First, get all the options from DropDown using GetFullTesxt or GetAttribute etc. (Let’s say options (string array type))
Then extract target option using the following expression.

strSelect = options.Split(vbCrLf.ToCharArray,StringSplitoptions.RemoveEmptyEntries).Where(Function(s) s.ToLower=strTarget.ToLower).FirstOrDefault

Finally select item using Select Item activity.

Hope the following sample helps you.

Sample20221209-1aL.zip (4.7 KB)

Regards,

1 Like

Here the issue is we can not use click activity unable to click on single option

Thanks For this solution but one more logic I need in this if in select item option is GoldFish and in input variable contains Gold Fish other things what I want are working thanks again.

Hi,

Can you try to add .Replace(" “,”") as the following?

strSelect = options.Split(vbCrLf.ToCharArray,StringSplitoptions.RemoveEmptyEntries).Where(Function(s) s.ToLower.Replace(" ","")=strTarget.ToLower.Replace(" ","")).FirstOrDefault

Regards,

1 Like

But This will replace spaces for all the input value
I want as per dropdown
consider in given
first input gold fish is there and in dropdown goldfish available
second input is take care and in dropdown take care available(if i use replace it will replace space for this also)

Hi,

The above expression is added Replace to target value and drop-down option.
So, it evaluates both string without whitespace. And in most case, there will be no problem.
Can you try the above with actual data?

Regards,

Its working thanks a lot for your fine solution

1 Like

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