The web page is like in the image shown above and i need to check 5 checkboxes at a time and click on a download button. After that i need to uncheck the same 5 boxes and then check the next 5 boxes until the end of the table. How should i go about doing this?
Hello @tejas.ma Welcome to the UiPath Community Forum
You need to use Parallel For Each and Parallel Activity for this scenario and adjust it with your use case.
Attaching the sample workflow for your help, but you need to adapt in your framework.
I have used a dummy html page to mimic the scenario.
Test.html (911 Bytes)
Main-2.xaml (19.5 KB)
Please let me know if it helps.
Thanks
Hi @tejas.ma
Could you confirm with this you have to check one by one of 5 boxes in a single time or you want to check 5 boxes as a single click.?
Either way works, but 5 boxes have to be checked and those same 5 unchecked before moving to the next 5
Okay @tejas.ma
It was looking like a Datatable structure, follow the below process,
β Take an assign activity and store the SrNo in a Array of String datatype, letβs call the variable name as Arr_Numbers. In your case,
- Assign -> Arr_Numbers = {"2","4","6","8","10"}
β Use Extract Datatable activity to extract the data as datatable and store in a datatable datatype, letβs call the variable name as dt_Extracted.
β Use for each row in datatable activity to iterate the each row in datatable.
β Insert an If condition inside the for each to check the condition
Condition - Arr_SerialNo.Any(Function(X) X.toString.equals(CurrentRow("SrNo.").toString))
β Insert an assign activity inside the If activity to store the SrNo. column value. Letβs call the variable name as SerialNo
- Assign -> SerialNo = CurrentRow("SrNo.")
β After assign activity insert an check/uncheck activity and indicate the first check box, when indicating it check the Strict selector and uncheck the fuzzy and image.
β Open the Ui Explorer of Click activity and select the attribute which contains the SrNo. value, then replace the value of that attribute with the SerialNo Variable and validate.
The above process first extract the data as datatable and iterate through each if the condition is validated the check the check box based on the Numbers that we provided in the Array variable.
Hope it helps!!
Hey @shantanu_chande , thanks for the reply. Im still a bit new to UiPath automation so i dont completely understand what is going on in the workflow but using parallel for each might not work as expected because ill have to check 5 boxes and click on the download button and then uncheck those boxes again
@tejas.ma In that case, I will ask you first go through the Academy training that is available on UiPath website - Associate Developer
The flow works in this scenario :
- Find Children Activity - Gets all the children available on th page i.e in your case its should be checkbox class
- In Parallel for each - We have passed those children (UiPath.Core.uiElement) and looped one by one to perform the checking operation.
you can alter the flow, where you can use two nested loops for getting child elements in a batch of 5 β check the checkbox β Download β Uncheck β Repeat
Thanks
