Make "Click" selector case sensitive?

Hello,

I’ve seen a bunch of forums explaining how to do this, but I can’t seem to get this to work in my situation. I am using the “NClick” activity to click on an address using a variable that stores the address. I have this variable written in the Fuzzy Selector expression. I normally do not have an issue inserting a variable there, but we have some addresses that are duplicate, with one being lowercase and one being uppercase.

How do I get my Fuzzy Selector to recognize case sensitivity? Here is how I have the expression written:

Any help would be greatly appreciated, thank you!

@Josh_James

What you have done is correct…only thing is you have to set to false instead of true…then case is ignored

IMG_5775

https://docs.uipath.com/studio/docs/case-sensitive-selectors#:~:text=How%20Case-Sensitive%20Selectors%20Work&text=Enables%20you%20to%20validate%20a,is%20not%20taken%20into%20account.

Cheers

Hello @Anil_G and thank you for the reply!

Unfortunately, it still does not work. The activity just hangs there. I don’t want case to be ignored, however. If the data table has the first row found as all caps, I would want the click to happen on the address that is in all caps.

@Anil_G I got it so the activity isn’t hanging on me. I deleted and re-added the activity, now it will actually click. However, when I set both ‘true’ or ‘false’, the click only wants to pick the address in all caps when it is on that row. The bot does click on each one like it’s supposed to, it just chooses the one in all caps when it finds a duplicate. It has to be a 1 to 1 match when clicking.

@Josh_James

Any specific reason to use fuzzy?

If its only for casesensitive then use strict selector only…it works there as well… this would solve the issue…

If you want apecific use strict always…if you want closest matches or so you would use fuzzy…casesensitive match works in both cases

Cheers

No reason in particular other than it’s worked for me in the past. How would I write the code for Strict Selector? I was struggling with that earlier and could not figure it out…

@Josh_James

Click on the 3 dots beside the strict selector option…

The selector would open…include the case sensitive tag as you need

And for the variables right click in place when you want to insert and select the variable you want

Cheers

Hi @Anil_G - Thank you, I found where to edit the strict selector. It still tells me it cannot find the UI element. Thoughts?

@Anil_G - I’ve seen maybe 5 different forums with others having this issue where the “variable is not defined in the current scope”. Seems to be a bug.

@Josh_James

When you use variable without default value it wont be validated …also did you right click and add the variable?

and css selector is not reliable…please dont use it

cheers

Ok, I cleared out css selector, and yes I did right click to add the variables. I added “test” as a default value to clear out the error, and the variable does show the correct address in the debugger window. The bot is still unable to find the UI element, just hangs there.

image

@Josh_James

How much timeout did you give?

Try printing straddress and check if its correct and use a ui explorer and see if it is exactly matching no extra spaces and all

And you did not add casesentivie

Cheers

1 Like

Yes, you are correct!! The UI explorer is pulling non matching data compared to the data table row where the address is contained. The matching data was in a selector called “visibleinnertext”. It was failing earlier because the address the UI was pulling was all on one row, where the “visibleinnertext” had the address formatted as three rows, matching the data table. I was also able to leave the default value blank and use the variable!

Thank you so much for pointing me in the right direction again!! Take care!

image

1 Like

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