Tips on How to make sure that a checkbox is clicked properly

Hi! I just want to ask for help to anyone who is good at UI Automation. So here’s the thing
I have this checkbox that I need to check, among the groups of the checkboxes. I need to click the first checkbox only

Here’s the file for reference: Click the Box.xaml (10.6 KB)

To make sure that the box is checked. First, I’ll put everything in retry scope, then I put an element exist to check if the first checkbox exists. After that, I’ll be checking if that checkbox is checked, if not. I will tick/checked the box. Then, I’ll check again if the Checkbox is ticked, so that if it returned false, it would retry, if it is true. Exit the retry scope.

This works most of the time in my run, Like 9/10 it works. But there are some rare cases on my runs that it would fail to click the checkbox. But instead, it clicks the border(not the box) of the checkbox. And for some reason, it wont retry the scope. I don’t know if it is a selector issue, or some other things. I hope you can give me some tips, Thank you.

Hi,

It seems there is no selector information of each activity in the xaml file. Did you remove it?
And doesn’t Check activity work in this case?

Regards,

I’ll try the check activity. I didn’t see this before. Thanks for the help btw

Hi

first the above tried method is correct
But it depends on what activity is used inside that ACTION block of retry scope

Make sure you have used CHECK/UNCHECK activity

Here you go with the detail on how to use that activity

https://docs.uipath.com/activities/docs/n-check

Look for the property Action and in your case choose to check (default). This won’t check the checkbox if its already checked.

Cheers @Archie