For each loop condition

Hi,

I want to write a condition for looping through each name.
image

Regards,

Hi @raju_alakuntla

Kindly try with for each UI Element, select the element you want to click and it will return all the elements, then pass currentElement to click activity

Regards

Hi @raju_alakuntla

You can use “Extract Datatable” activity to extract the data as a datatable. Then use the “For each row in datatable” activity to iterate through the each name. Then use “click” activity, modify the selectors for clicking on every “+” button.

I hope it helps!!

its taking only one name and clicking on it but not going for others.

Regards,

When you are doing click activity. you have to take the counter variable. Open the Click activity selectors and find for the best attribute which suites. Replace the attribute value by counter variable. Increase the counter variable at end “Counter=Counter+1” like this. Then it will every search button in every row.

Best Regards.

I didn’t understand, can you explain in detail if possible can you share some screenshots please.

Regards,

I have developed a program regarding this issue:

Change the click selector attribute by counter variable as shown below:

Check this once!!

not able to edit this.

Regards,

Open the UI Explorer there, then you are able to edit the selector.

For editing selector. Select the attribute from attribute panel in UI explorer.
Select the value want to change and right click, select the choose variable option and select the counter variable.

still getting error.

Regards,

Hi @raju_alakuntla

Would you please click on first name and share the screenshot of the selector, then click on second name and share the screenshot for that too.

Screenhot should from the UiExplorer window.

Thanks!

Hi,

for First Name:

For Second Name:

Regards,

As per my understanding by considering the above screenshots. It will work it was only dynamically changing the table row attribute value. I think it will work.

no. Its not iterating for the second and so. Instead its taking the first one only.

Can you check the flow please

Regards,

Send me the screenshots of selectors with out modifying with variables of click on first name and second name as well.

for First Name:

for Second Name:

for third:

The value for the Table row attribute is not changing. Try with the another attributes.

If its not sort out then send me a google meet link then I’ll join and we will try to solve the solution for this.

can you send me the google meets link please

Regards,

Hi @raju_alakuntla

You can put all the names in the array of string type variable eg- strName. Then use a for loop and within a loop use a click activity and in selector of click activity use the attribute aaname and assign variable strName to aaname.

Thanks!