In my project I use CV activities in which I need to click on a dynamic Text value which I’m passing via a variable.
The issue is if the options available on the screen are as follows:
My Text 1
My Text 2
My Text 3
Even if I’m passing the text in my variable as My Text 2 it’s clicking on the first value (My Text 1) when I have run in debug mode it’s highlighting the word My and started clicking on it.
I kindly request someone to help on this.
I cannot provide the screenshot/.xaml here as this is on a restricted area.
You should be working in modern and using the regular activities that have CV selectors built in, not the CV activities. Try that and see if it works better.
“Target: Text '”+MyVar+“’ (243,256,40,56)”+
“Anchor: Text ‘Nearby Static Text’(215,252,39,59)”
You’re looking for the text MyVar which is on the same horizontal line as the Nearby Static Text.
It would help to add accuracy to the target text OR consider an anchor that also moves horizontally with the chosen text
To add accuracy you would need
“Target: Text '”+MyVar+“’ (243,256,40,56) Accuracy: 0.99”+
“Anchor: Text ‘Nearby Static Text’(215,252,39,59)”
Use UiPath’s modern activities with your variable to click exact dynamic text. Avoid manual CV descriptors and coordinates…these built-in CV-enabled activities handle text matching accurately.
Always validate with the Highlight feature before running
Still didn’t work = It still clicks on the wrong item or it says can’t find element?
You can try only “Target: Text '”+MyVar+“’ (243,256,40,56) Accuracy: 0.99” as the descriptor, without any anchor. Be sure to write it exactly as I wrote it with a space between ) and A and between : and 0