As the title suggests, I really want to understand the exact mechanism of the WaitForReady property of an activity.
The following piece is quoted from the ACTIVITIES GUIDE of UiPath.
The default setting is [INTERACTIVE] as we all know and it does pretty well work with most of cases.
However in some circumstances - where certain activity gets paused for a moment although the target is obviously already ready - I had to set it with [NONE] in order to make it proceed.
In that case, I feel like I’d be better off setting [DelayBefore] with reasonable amount of seconds just in case it causes any unexpected exceptions or so.
I’ve tried all of the options to see the difference, but I still don’t understand how those options exactly work behind.
If anyone has any idea or opinion, please share with us.
WaitForReady – wait for the target to become ready, before performing the activity. There are three available options:
None – does not wait for the target to be ready.
Interactive – waits until only a part of the app is loaded.
Complete – waits for the entire app to be loaded.
Also:
WaitForReady - Before performing the actions, wait for the target to become ready. The following options are available:
None - Does not wait for anything except the target UI element to exist before executing the action. For example, you can use this option if you want to retrieve just text from a web page or click a particular button, without having to wait for all UI elements to load. Note that this may have unwanted consequences if the button relies on elements which are not yet loaded, such as scripts.
Interactive/Complete - Waits all of the UI elements in the target app to exist before actually executing the action.
To assess if an application is in the Interactive or Complete state, the following tags are verified:
Desktop applications - A wm_null message is sent to check the existence of the <wnd> , <ctrl> , <java> , or <uia> tags. If they exist, the activity is executed.
Web applications:
a. Internet Explorer - The <webctrl> tag is used to check if the Ready state of the HTML document is set to Complete . Additionally, the Busy state has to be set to “False”.
b. Others - The <webctrl> tag is used to check if the Ready state of the HTML document is Complete .
SAP applications - First the presence of the <wnd> tag verified, after which a SAP specific API is used to detect if the session is busy or not.
i don’t think so. It can make your workflow go into an infinite loop in case the application hangs.
I had this issue with SAP, where the workflow ran for 2 days in production because the application did not respond and the robot was waiting. I would suggest to keep this in mind before choosing any option
I’ve had issues where, whenever I had it as the default “interactive”, the bot would skip certain clicks, type into and element exists activities and once I changed it to complete it worked correctly every time. If the application is being unresponsive and results in hanging for a very long time, I would look into the timeout property.
@Anurag_Singh1 - Hi, even we are facing the same issue with SAP. WaitForReady is INTERACTIVE by default. How did you resolve the issue? Will it work fine if we keep NONE?