Dynamic CheckBox

How to Click all checkboxes dynamically from List?

For Example
1)There is a list of items{Apple,Watermelon,Orange} from config file
2)Then the CheckBox should click all these items
3)Also if items are repeated in checkboxes then those should be clicked as well

Thanks in advance:)

Hello @anmita

Here you need to analyse the attributes in the selector. Inspect on any two checkboxes and check whether any attribute can be converted to dynamic by passing some varibale. for eg: if you want to click on checkbox for orange; aaname=orange. Like this some thing should be there to click on checkboxes based on the input variable.

Share the screenshot from the uiexplorer here for analysis.

1 Like

use for each for iterate over and use dynamic selector like pass var inside selector
in check activity

Hi @anmita,

If your selector takes a name, you can dynamically introduce the list elements in the selector. You can click on all of them with a for each loop.

For example;

<webctrl tag='INPUT' aaname='your list row name' type='checkbox' />


Thanks @Rahul_Unnikrishnan. I will get back if I need further assistance

Thanks @muhammedyuzuak for reference


1st Approach:

  • Loop through each item
  • Take click activity inside loop
  • Indicate element for one of the item (lets say orange)
  • Make sure the selector has aaname, if you don’t see it open the selector in UiExplorer and do necessary changes
  • Now, try passing the different value to the aaname (this time lets Watermelon), if its working then try passing the variable which should have each individual item

2nd Approach:

  • Sometimes it cannot directly work with aaname since the bot finds all were check boxes and it might get confused on which check box it has to click on though the selector has aaname
  • in such type of cases, try with anchors . Below example on how to use anchors

You’re welcome. I hope it was useful. @anmita