How to do For loop method in web ui radio button

Hi,

i am doing one ui project to click radio button one by one like for loop below i share screenshot.

above one blue link is there lefts ide radio button is there for all account now i need click first radio button then click download button then click next radio button like that for loop is possible ???

below attached my workflow screenshot for referance.

Yes it is possible.
Firstly use Extract Datatable activity to extract the whole table
then create loop over datatable. Then you can use 2 click activities. First to click on Radio button (in selector use Invoice number as anchor, Invoice Number will come from loop of Datatable) and then use second click activity to click on hyperlink. Example below

variable >> Extracted_DataTable

For each row as DataRow in Extracted_DataTable.AsEnumerable
   Click Activity for Radio button > use anchor of Invoice number i.e . "first_part_selector" & row("InvoiceNumber").ToString & "second_part_selector"
   Click Activity for hyper link > use anchor of Invoice number i.e . "first_part_selector" & row("InvoiceNumber").ToString & "second_part_selector"
Next row

Let us know if you need further clarification or help

Hey @MD_Farhan1,

Find all radio buttons using Find Children, loop each UiElement with For Each, inside loop click radio button, then click download, continue to next radio until completed.

In Find Children give parent container selector of all rows, scope as Descendants, filter as empty. Save output in variable radio_buttons. In For Each use Type UiElement, input radio_buttons. Inside loop put Click activity, in Target property use currentItem. After that place Click activity for Download button.

Try this and let me know

@MD_farhan1
Try to gather information in a dataTable by utilizing the “Extract Table Data” activity by screen scraping. Use the ‘For Each Row in DataTable’ activity to click on the radio button for item selection and then click on the download key to initiate the download.

You can create a dynamic selector for each row.

Hi @MD_Farhan1

Can you try with For Each UI Element activity

Regards,

1 Like

Hi,

if possible to share the workflow screenshot for me.

Thank you

Hi,

if possible to share the workflow screenshot for me…

Thank you

@MD_Farhan1
Please find the sample screenshot

Hi,

attached my workflow above pls check but its not working to click all radio button

most probably, you are missing dynamic selectors
Is it possible for you to attach the xaml file ?

1 Like

hi,

sure

Main.xaml (41.0 KB)

Unable to access the Main workflow.

Please open “Click ‘DIV(3)’” in Ui Explorer, choose the AAName as Selector, and input the Variable “CurrentRow” before attempting again.

You may verify your UI Element by substituting the “AAName” with the items from the list. Additionally, attempt to fix the UIElement if you encounter issues while validating the element.

Hi @MD_Farhan1

Did you try the below workflow using for each ui element activity by passing the element in the input element of the click activity

Hope it helps!

this also not working

@MD_Farhan1

What do you mean not working can like were is it failing. Is it possible to send a screenshot ?

I too not able to open the file.

@MD_Farhan1 from your file I can see you are using the <webctrl class='lookupButton' idx='2' tag='DIV' /> selector (may be along with CV). The selector <webctrl class='lookupButton' idx='2' tag='DIV' /> is not dynamic in needs to include Invoice Number dynamically.

You can refer this user guide or this post for Dynamic Selectors