Error while using dynamic selector in id='' for clicking checkboxes

Hi all,

I am currently working on a scenario where I have to check mark all the check boxes available on the webpage. I am using the dynamic selector like this:

The workflow is like this:

While executing this workflow I am receiving the following validation error:
image

@sonaliaggarwal47 @prasath17 @Palaniyappan

Any help in this regard will be highly appreciated
Thank You

enthusiastic

@enthusiastic

Instead of Idx suggest to try with another tag

If no tags other than Idx then check whether the IDValue is declared in the entire sequence scope? Also IDValue should be in Int32 format so that you can make an increment

Hope this may help you

Thanks

1 Like

if I try to covert idvalue to integer the selector is not validating then. It throws an error

As far as I understand, the idx property is usually allocated dynamically by uipath, if more elements exist with the proposed selector. Adding a variable to it might create an unresolved selector of which idx is never initialised as a property during runtime??

Also the css selector as main selector looks kinda static. Are you surethat with that selector multple instances of it exist?

Did you test your selector statically before making it dynamic?
As in click idx=β€˜1’ and idx=β€˜2’ etc first. Does that work?

If yes… you may want to try using Find children where you identify the parent container of your checkboxes, and loop through them accordingly nstead of using the dynamic idx method.

Hi @enthusiastic,

Please try finding other attributes for selector like aaname, inner text etc, tablecol,tablerow( if check boxes inside a table).

These attributes will help better identify check boxes. And then trying to identify relation between those check boxes can further help to reduce selector. Usually these have relation between these like their Id increasing by some counter value or some digit changing in their text value. If you can identify something like this , it would help.

Using idx attribute is not a stable way to identify selector, would suggest to avoid using that.

Regards
Sonali

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.