I want to know the best approach to abort/stop the bot and retry if the bot gets stuck for the longer period of time?
Best approach to **abort/stop** the bot and **retry** if the bot gets stuck for the longer period of time
while process in running in between you can check what and all the application are running in the windows,
Get all the application running on the windows,and check the applications related your automation and get the start time of the application.
if the application running more than expected time, take screenshot and send a mail to the use and then retry from the beginning or popup a input box to use that they want to continue or want to restart from the beginning.
this is just an idea from my side, might work for you
It depends on what is causing it to ‘get stuck’
If it is a particular activity, they have default timeout settings for most if not all whereby an error is eventually thrown. Therefore you would be best to place your sequences in Try Catch blocks and initiate a retry when an error is encountered.
You adjust these timeout setting to your expectations of how long things should take. For example, if it is the length of time for a web app to load, use an Element Exists activity to monitor the length of time it takes to load particular interfaces.
If you are very much aware of the usual run time , then what you can do is
put ur process inside Parallel Activity
- initiate a stop Watch
- then give a delay for the usual run time
- check get total elapsed second and if it is greater than that use throw activity with a custom message to stop the process. or here u can stop job
hope this helps