I need to click Upload buttons only when it is mandatory, how can I make a loop from those buttons
You can do it in two steps. Create a new blank test and add input parameter
counter and output parameter
result_counter, you can do it by clicking the 3 vertical dots and choosing Input/Output from the options.
Now add Action step with Addition with 1 in A,
counter parameter in B and
result_counter in Result.
Add Element Action step, when you choose the element create new one by clicking the blue + sign on the bottom. Create the element and use the
counter parameter as an index.
Delete the built in navigation step. The test should look like
Now in your test add parameter counter with default value 0 and add Test step with
counter as both input and output parameterts
In the bottom you will find Step Repeats, edit it to the number of elements.