The state of the checkbox (checked/unchecked) is usually somehow reflected in the attributes. You can attach a log message to the 'Attributes' property of the find web element to see the state of the checkbox.
Another way to do it is to select a checkbox in the developers’ console (in Chrome Ctrl+Shift+J) and see if the attributes change with the state of the box, i.e.
![]() |
![]() |
If they do, here is how you can use that to create a script in your case:
* If the attributes stay completely the same (i.e. the state of the checkbox is not getting changed in the developer's console), you can use Run Web JavaScript block to find out the state. Run Web JavaScript block holds the values in an array format. The variable 'abc' contains the value at the first array position(checked/unchecked in this case) and the value is returned as 'Result'. You can attach a log message to see the state of the checkbox.
For more details please refer to this video.
For any clarification, please contact our Priority Support.
Comments
2 comments
Hi Ankur Bhuvan,
Please update an article for the same case in desktop Application.
You can refer to the article: https://support.leapwork.com/hc/en-us/articles/360027324752-How-to-get-checkbox-state-in-Desktop-application-
Please reach out to our live chat support for further queries.
Please sign in to leave a comment.