I am trying to click all the checkboxes inside a website that is unchecked. I tried to use find children activity to find all the checkboxes in the webpage, then use for each activity to loop through all the checkboxes, and then use get attribute activity to see if the checkboxes are checked. If yes then uncheck the checkbox. But it is not working. It would either give an error of ‘Get attribute: Error HRESEULT E_FAIL has been returned from a call to a COM component‘ or the get attribute would return all blank results even though there are checked checkboxes exists. Do anyone know how to fix this or can we do the same thing without using the above method?
P.S. I am not able to using check activity to check the boxes. I need to use click activity instead but seems UiPath cannot recognize it.
The above steps refer to postwick’s method in How to click each checkbox on a for each - #8 by postwick.
Please show what you are trying to do? Or what you did already and what is used as filter in find children?
Cheers
Two things here
- the filter is on tag input…even text field etc will have tag input
- Checked might not be the attribute you get for every input type field
please use a proper filter to only filter for checkboxes and leave other type of input types
cheers
Hey @JoyceP,
I believe that, find children is identifying the other input fields as well in the App.
below approaches would helps you.
- Check Find Children output count with elements in App.
- Get Attribute - Try innerhtml to check what elements are identified.
- inside for each - add Try catch and log exception message to check each fields exception.
I don’t quite familiar to these. What should I input for filtering checkboxes?
That you will know by using ui explorer and identifying the checkbox attributes …check what is unique for checkbox and not present in any other fields and use them in the filter
Cheers
Use the Check/Uncheck activity - it automatically determines if the box is already checked or not, and checks it if it isn’t.
Then how do I know which attribute that is right for my case?
Indicate the elment when check and not check and see the difference in attributes
Laso see the different in attributes for check box and text box field and accordingly use them
May be there can be an attribute change in class
Cheers
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.