Click Activity Random Execution

HI,

I have created an workflow like this, but the issue am facing is click related tasks are not getting executed in a sequential order and the variables are incremented or getting substituted with the values that correspond to next element in the order as a result when file is getting downloaded for say Iteration 1 , the file name of iteration 1 constitutes of the variables that actually belong to Iterator 2 or Iteration N , the behavior is very very random .

Did someone faced such issue before, if yes, can you please throw some light on how can this be fixed ?

for each counter in (1…100)

Sequence:

Find Element (scrapping datatable of webpage)
Extract var1 after some pre-processing

Find Element (scrapping datatable of webpage)
Extract var2 after some pre-processing

Find Element (scrapping datatable of webpage)
Extract var3 after some processing

fileName = counter.toString + var1 + var2 + var3

HTTP Download (fileName) of PDF File to local directory

Observation: not exactly like this but file names getting generated are very random,

When iteration is 1
fileName generated if like 2 + “xxx”.pdf

When iteration is 5
fileName generated is like 10 + “xxx”.pdf

Hi @Nerella_Mounika welcome to UiPath community.
It’s a bit hard to say what is happening, but what I can suggest that might help you a bit is to just add a write line activity all over your sequence to keep track of the counter value along the way and see on which part it is somehow become changed

Sequence:

Find Element (scrapping datatable of webpage)
Extract var1 after some pre-processing
WriteLine: "Counter value after var1 is " & counter.ToString

Find Element (scrapping datatable of webpage)
Extract var2 after some pre-processing
WriteLine: "Counter value after var2 is " & counter.ToString

Find Element (scrapping datatable of webpage)
Extract var3 after some processing
WriteLine: "Counter value after var3 is " & counter.ToString

fileName = counter.toString + var1 + var2 + var3