Check All boxes and Then Uncheck them

Hi Everybody,
I want to check all boxes available on a web app and then uncheck them all.
How should I proceed?

Hi @Youssef,

Its very simple all you need to do is use “Check” activity and provide the correct selector to it.

→ To check a checkbox, set the property ‘Action’ to “check”
→ To Uncheck a checkbox, set the property ‘Action’ to “Uncheck” as shown in below screenshot

Sample website:

CheckBox.xaml (5.4 KB)

@Suman7 Thanks a lot.
But how if the number of check boxes changes?
For instance, with customer x, i have to check 2 boxes.
with customer y, i have to check 3 boxes.
How can I automate it and check all the boxes available automatically?

Those rules have to be built into the workflow. Then instead of hardcoding the number of boxes to check, you’d pass the variable/argument instead.

So the robot would see it is customer x, it’d then pass that 2 boxes need to be checked.

Also, after re-reading your question. You always want ALL the boxes to be checked, but the number of boxes available changes? If so, that could be dealt with in an easier way than my suggestion above

Yes Dave you figure it out. No matter the number of boxes, i want them all to be chechek in the web app.

In that case, what you want to do is to use the ‘Find Children’ activity.

You’ll need to identify the level at which the “parent” will be identified, but then using this activity you can use to identifiy all the children/descendants of the type “checkbox”.

This will spit out an IEnumerable variable. Use a for each activity to go through this IEnumerable. In the do block of the for each, use the ‘Check’ activity and pass in the current UiElement as the Target. make sure the action is set to “Check” within the properties too (or Uncheck/Toggle, whatever you need to do)

1 Like

Thank you but it does not work. It does not recognize the UIELEMENT.
Please check the images attached

It is very difficult to help without seeing the same website. If it isn’t finding the UiElement, that means the wrong selector was used. Keep playing around with it if you haven’t found it.

Another way to find it if the Ui Explorer tool isn’t working properly is to right click the element in chrome and click “inspect”

a mi no me funciona esta opción el UiPath no me reconoce esta acción

A mi tampoco me funcionó

sería agradable que alguén explicara bien que debemos hacer en caso de que suceda esto la verdad he visto este error muchas veces