Is it possible to get back/retry an activity if the internet connection got back

So I have this scenario in which I navigate/move in a certain website. I need to check if the error/timeout that occured is due to an internet connection loss. I did it with a try catch and managed to check if the internet is down. While the internet is down, I would need to refresh the browser maximum of 4 times before stopping the entire process. Problem is, I need to go back/retry the activity that gave the error if the internet connection came back before refreshing for 4 times. I can’t think of a way to retry an activity except from putting everything into a nested retry scope, but It would be very messy to look at.

I hope you would have surrounded that specific activity in a try catch activity
If not we can use the same
So that if the activity that fails because of that timeout issue due to internet connection then it goes to Catch block where we check for the internet connection

There in CATCH block you can keep the same sequence fo activities to retry

Cheers @Raffy

So It’s like let say, In try block, I have a series of type into activites. If the said activities failed and in catch block, if internet problem is the reason, I’ll redo/put the actvities in the Catch block. Am I right?


Just thought from my side instead of using try and catch we can go for simple element exist activity to check the unique Ui element available and output of this activity would be boolean. if it is not available due to internet it will check for some amount of time and it will go to the false condition there we can use some counter to decide how many time we can retry the steps and we can connect it back to the steps which is used navigate to website again after some interval of time(hard coded delay). for the retry counter we can have 3 or 4 so that those many times it retry to resolve the issue. thanks.

Wouldn’t this be requires a lot of Element exist and If-else? I’m not sure if my understanding is correct, but would this require to put an element exist activity for each activity?

if it is use case related to case to case automation and we are using RE frame work we can have the above logic for the navigating to summary page/ landing page since once it got failed in process transaction it will go to init to re launch the application. i am sorry may be in your case you should go for try catch block i guess. thanks.

Thanks for the help, I’ll look into this too.

your welcome @Raffy . it is nice connecting with you.

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