Hello i am trying to perform a looping through a list inside a desktop program.
I have managed to increase the result by 1 so it loops, but the problem its to tell the robot when to stop when it has hit end of the list.
What i am doing now its i have made a var to a selector in a index number from the list. I then assign + 1 to that variable for making it go down the list ( increase its index number by 1 )
But at the end of the list its crashing ( because its looking for example index 8 )
any ideas ?
1.Take a count of list items in a variable
2. take a Counter Variable Default it to 1.
3. After Each Transaction . Increment the counter by 1.
4.Do the Processing only When Counter < Count of List Items.
Haven’t you tried using the data scraping wizard to scrape the data in the grid so that it would be easier for you to travel through the list?
If not, it you are using the current approach you have, I think you can use a try catch activity here. So in the try part you will have your activities and at any point it goes to catch part, that means you have reached the end of the line. Something like that…
Use “Element Exists” activity with the same variable selector like you use in the “Get Value” activity. It will return true/false depending on validity of given selector. When you step out of the list it will retun false so you know you should terminate the loop. Clear?