Complete, Interactive Element

selector
studio

#1

Team,

We’ve built our very first robots which is about to go to PROD (this weekend). One major issue that we are finding during testing that 7-10 times certain scripts pass. 3 times that they do not is due to “selector not found”. Since this is unattended robot, VPCs that this runs under are not accessible to developers (mimic PROD).

When adding screenshots to see it, we can see that the tree times it failed was due to fact that page loaded slower then 3 seconds. It is random on which activity it fails (and we have 200-300 activities in our script).

We have changed “on complete” to “on interactive” and vice versa. On some we’ve made a loop to keep checking.

Question: Shouldn’t “on complete” wait until element is completely painted before it tries selecting? Do you have better ideas?

Also, is there a global config variable to change default 3 seconds to maybe 10 before it gives up? I know there is also 30 second wait time, but it seems that activity is only waiting for 3.

What am I missing?

PS. Due to this, QA does not want to sign off until I have something more tangible to prove it’s not the script issue :confused:


#2

@Kemal:

If you are certain that some parts of the process take longer time to load, you can use the Delay Before or Delay After properties to wait for specified time before moving to the next step. We have intentional delays in most of our workflows, just because the robot runs faster than the interacting application.


#3

On Complete waits for all of the element to finish loading and be present. Interactive waits for the bare minimum required to interact with something, we tend to find that means some buttons are not available yet.

There is unfortunately no global config variable to set the delay, but that appears to be the best way to deal with these.

We tend to handle issues like this with a “find element” activity. There’s a long time out and it will wait until the element required is available. You could also try an element exists, if it is possible that there may be different elements appearing, or you’d prefer it to time out quicker and allow for error handling.


#4

Thanks @cotly, I just feel that it is not practical to add “find element” to all 200+ activities that being type or click. On Complete should wait until element is finished loading, but problem is that it does not because that delay is only for 3 seconds, so on complete, it seems only waits for element to load for 3 seconds and if it does not it fails.

Also, it is random as I mentioned, so sometimes it works and sometimes it does not - i was hoping I was using it wrong, but it seems I’m not based on @PD2 response.

@PD2, again Delay is not practical because it does not happen all the time. Where we know it happens we actually use element exist in a loop for 120 seconds with delay to retry every 5 seconds until done to max of 120 seconds. These are the ones where we know we get large amount of data. But type into, or click is all over the place and these are the ones that fail.


#5

There’s the option to use a variable for the Timeout field, so you can change it globally.

Also you mentioned the delay is 3 seconds. That’s pretty strange, hasn’t been reported by others. That’s in milliseconds, so it should be 30000 if you need a 30s wait time, or remove it completely for the default (30s).


#6

@Cosin - help me understand, please.

30 second is used to validate for overall page/element to appear.
What we are finding is that - click activity, will miss clicking on something and proceed on clicking next item in flow, causing an issue and error. We’ve timed it and click activity under Target -> TimeoutMS is 3 second. If we increase this variable by 6000 then it works - unless the page takes more then 6 seconds, then it fails again.

So, we were hoping that “On Complete” Wait for Ready property would wait for this element to appear for default 30 seconds before it gives up, but it does not.

Are we missing something?

Also, how do you set variable 00:00:03 for 3 seconds? Its not a string!


#7

bump …

I understand this is specific to my problem - so let me re-ask the question.

How do you ensure that item is clicked on the page if you have 10 click activities? Do you simply add click activity and let it do it’s work, or you do something different?

My example above, click activity would miss first click probably because page did not fully load but UiPath thought it did - other 9 click just fine.