How can I Set dynamic timeout for UiAutomation Activities (i.e Web Automation).
Example:
Let’s say I want to wait up to 1 minute (60 seconds) for a button to appear, but if the application is slow, I want to increase the timeout to 2 minutes (120 seconds).
You can apply Retry scope activity to handle this situation. If the UI element is not available at first 60 seconds, bot will try for another 60 seconds to get the Ui element.
you can define an asset for timeout value. And provide the same in timeout property of the activity. So, if after multiple runs, you have observed that activity is failing(because application is taking more time to load), you can increase the timeout in orchestrator and re-run to observe if it improves the situation.
If you have multiple activities where you would want to control the timeout range, I would suggest creating 3 assets for timeout like “short timeout”, “medium time out” and “long time out”.
Based on your observations from test runs, you can accordingly adjust the values and use it at different places.
Hi @ronak.patel
You can try below steps
UiPath activities like Click, Type Into, Element Exists, etc. have a Timeout (milliseconds) property.
Normally, you hardcode a value (like 30000 for 30 seconds).
But if you want dynamic timeout — you can set it through a variable.
Hope it works for you!