Click Action in loop

Hello Great community ,

I would like to ask your help about click activity in UI path community edition 2024.10.4.
Background:

I am using a excel file in which I’ve stored the variable names , afterwards I am using a for loop for accessing those variables say ‘variable_1’ from excel file. Now What I would like to do is that taking these variable names ‘variable_1’ and then clicking the exact name onto a application which I am trying to automate.But after displaying the names of the variable in message box it is not clicking where it is supposed to click on the other application interface. Is there any suggestion for this kind of automation. Thank you(possibly a sample example would be great)

@a.bhandwalkar,

You will have to put that in the selectors of the Click activity. You ma share your selector for Click and we can see where we can put the variable value.

Thanks,
Ashok :slight_smile:

You need to use click activity and in the property of the click activity
First capture the element and then check the selectors
Now in the selection change parameter with the Variable name.
If it’s any row name or column name or aa name for this you can change the attribute and give variable there

Thanks
Jagravi

here is the rest of the part

@a.bhandwalkar,

Selector from Properties of Click activity please

You need to share the selector
Select activity see right side properties panel will be there and from there go to selector and open it

@a.bhandwalkar like this.

The image shows a software interface with parameters related to a button, highlighting "fuzzy selector" and "strict selector" fields. (Captioned by AI)

Can you click three dots from strict selectors
Also in the targeting methods drop down keep only one checked like strict selector
Remove multiple selections @a.bhandwalkar


and BlinkerName is the variable which stores the variable name

Click on this plus icon and share that screen shot


text: “”

It’s not fully visible
But here you can check the attribute which is having the name of the element you want to click and there you need to pass the variable @a.bhandwalkar


Blinker_1 is the button name where it should click and then Blinker_2

I think it’s not identifying the button clearly
Again capture the element
Try to change the framework like UIA and aa and see the selectors getting generated
Here as per the screen no proper attribute is there where you can pass the variable name @a.bhandwalkar

Also if possible can you show ss of the button ?
As in button name will be consistent right ? Exactly which ui element you want to pass using variable

image

these are the elements in the application on which I would like to click one after another.

If you look at my previous ss of the complete sequence it is clear that these Blinker_1 ,… are stored in the excel file and then I am doing rest of the things.

Try to recapture one by one and see the selectors
Your selector on previous screen shot would fail

Recapture and see if you can pass variable
Else if you have fix 5/6 button what you can do is workaround using switch case activity
Use switch case activity and change value type to string.
Than for each case will have click on respective button
Like
Case1: blinker1

Click button 1

Case 2: blinker 2

Click button 2
Like this and in default case you can pass log message

But this is workaround which will increase code length ,
Ideally try to utilise selector only and if nothing works there you can try this workaround @a.bhandwalkar

Thanks !

@a.bhandwalkar,

It’s selector issue. You have to remove everything from Name attribute and replace that with your BlinkerName variable.

Thanks,
Ashok :slight_smile:

Yes, Thank you @ashokkarale :smile:

1 Like