How to run the bot if in a loop one element is not found, Bot should run for the next iteration

Hi,

I want to run the bot in a for each loop if an element is not found even though the Bot should run for the next iteration and should not fail. How can we do this.

Regards,

Hi @raju_alakuntla

You can use the Retry Scope activity to execute a set of actions again & again until a particular condition is not met.

Hope this helps,
Best Regards.

I have data in excel file, I want to search a value in a website and loop through certain set of actions if the value finds. But in a case if the value is not found then it will iterate for the next value without failing/ going for the set of actions.

Can I do it through Retry scope??

Regards,

@raju_alakuntla

Well, in that case, you can directly leverage the For Each activity for this. Loop through the value, search for the same & use an If condition to check if it is available. If yes, you can perform the set of actions repeatedly. If no, you can use the Continue activity in the else block to jump into the next value.

Hope this helps,
Best Regards.

Hi Raju,

You can use if condition logic and write your logic inside the of block

or you can mark activity continue on error in properties so it doesn’t fail when values are not found

@raju_alakuntla

Use a check app state activity and check if the item
Is present…if not present that is on the else side use continue activity which will move to next iteration without performing an activity below it

Cheers

1 Like

It is not going to the Else block/target doesn’t appear when the item doesn’t find. How to make it.

Regards,

@raju_alakuntla

If its not going to else then it means the target is vsible…or you are using some selector which is present on screen.Check on the same

cheers

thank you anil.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.