How to check if checkbox is checked or unchecked

Hi Experts,

I am trying to identify how to check if checkbox is checked or unchecked. Which activity need to be used?. can anyone help me out with this.

3 Likes

Hi @mnawazud,

If you indicate it in the selectors You can fine a property called checked there you can find the status…
1.After indicating please check in the property explorer in UI explorer you will find the property fro checked…
Cheers.
Vashisht.

1 Like

Hi @mnawazud

use Get Attribute activity there you can select checked option

image

Regards,
Kommi Jeevan.

9 Likes

hi @mnawazud

you can get it by get attributes activity.

image

Regards
Ajay

2 Likes

With Get Attribute activity I am getting an error.

It would be helpful you provide sample xaml file where I can see how get attribute activity works

1 Like

@mnawazud

I have attached zip file after download unzip and open run main.xaml file here I verified zoho website login page there I checked check box checked or not.

checkbox.zip (35.3 KB)

2 Likes

@mnawazud. You checked workflow its working fine.

1 Like

Hi Kommijeevan,

Thanks for the xaml file, but I am getting an error in get attribute activity.
Please find the below screenshotCapture1

Can u check on the error screenshot for reference

1 Like

Did you ever solve this issue? I am getting the same error message.

1 Like

Try to do inspect element on the Check box, see the properties of the the check box(both Checked and Unchecked). Find the difference between both and make changes in Get attribute text accordingly

1 Like

Hola al día de hoy alguien pudo resolver el error a mi me sucede lo mísmo y he intentado con la actividad de obtener atributo y comprobar pero nodo no puede ser leído ya que el checked hace parte de una etiqueta html span??

1 Like

Use Element exists activity. Within that, in the selector, use the property → Checked.

Checked=‘1’ → this means checkbox is checked.
Checked=‘0’ → Checkbox is unchecked.

Thanks & Regards.

Way to revive an ancient topc :wink:

Not unimportant: looking at the previous error screenshots: that the checkbox is an actual checkbox. That is, an element that has the checked 1/0 property. If it is just some CSS triggered image with a check in it, it might not have that attribute.

In that case there is often some sort of class attibute you can use to determine which one it is. Simply look closely at the element or even parent element in both states (checked/unchecked) and look for a difference.