Is it necessary to repeat this code over and over or can it dynamically change?

Hi All

so I am getting somewhere with my request, and have discovered that the code has a trend to it, the two aspects I am looking at are below and highlighted are the two parts that only change by one numbers(starting at one and ending at 10)

so is there a way I can tell uivision to increment this one by 1 each time, first checking if the matches element is there, and then press OK button, and them move onto the next one, repeating 10 times?

You can replace the changing part with a variable, and then loop over it. Similar to here:How to web scrape search results - #2 by ulrich

@ulrich tried this and got the following solution

},
{
“Command”: “pause”,
“Target”: “5000”,
“Value”: “”,
“Description”: “reconcile”
},
{
“Command”: “times”,
“Target”: “5”,
“Value”: “”,
“Description”: “xero”
},
{
“Command”: “times”,
“Target”: “10”,
“Value”: “repeat”,
“Description”: “xero”
},
{
“Command”: “verifyElementPresent”,
“Target”: “/html/body/div[2]/form/div/div[1]/div[2]/div[1]/div[3]/div[${!times}]/div[3]/div[2]/div/div[2]/div/a”,
“Value”: “”,
“Description”: “reconcile”
},
{
“Command”: “if_v2”,
“Target”: “${!LastCommandOk} == false”,
“Value”: “if possible matches dont exist”,
“Description”: “”
},
{
“Command”: “click”,
“Target”: “/html/body/div[2]/form/div/div[1]/div[2]/div[1]/div[3]/div[div[${!times}]/div[2]/a[1]”,
“Value”: “”,
“Description”: “reconcile”
},
{
“Command”: “end”,
“Target”: “”,
“Value”: “”,
“Description”: “”
},

but it keeps returning a error saying timeout reached when looking for element, the output comes to

‘/html/body/div[2]/form/div/div[1]/div[2]/div[1]/div[3]/div[1]/div[3]/div[2]/div/div[2]/div/a’

which appears to be correct, so not sure why it would be saying it cannot find it.