I am facing an issue with the “Processing” message that appears when I click the Search button on the website. The message disappears once the process is completed, but the processing time varies—it can take anywhere between 30 seconds to 3 minutes.
I am using the Wait Element Vanish activity in UiPath, but it does not always work as expected. If I increase the timeout, the activity still fails in some cases.
I considered using a While loop to continuously check for the element’s existence, but this has a drawback:
If the “Processing” element never appears (due to a page issue), the loop will become infinite, causing the bot to hang.
Could you suggest a reliable approach to handle this scenario? I
If you are using while loop, add a limit on the loop condition as well to stop it from going in infinite loop. For example if you are checking the elements existence with timeout as 30 seconds and you want to check the existense for maximum 5 minutes(300 seconds), that means you have to run the loop for max 10 times. To achieve this along with your current condition in while loop you need to add one more condition ( create a counter(interger) variable with initial value as 0 and till the time element is not found keep incrementing counter value by one. And in while loop condition along with your currrent condition add this : {current condition} and counter < 10. This will stop it from going into infinite loop