On Element Appear. Activity timeout exceeded

Getting this error for my On Element Appear.

Tried setting the Repeat Forever to false however I tried putting a click activity and send Hotkey activity to close the message box but the process finishes before the message box appears on screen.

export_msg

@Nelson.R

Once give it a try with Element Exists activity.

1 Like

I got the output true. How can I use Element Exists to close the window?

There is a minor bug with On Element Appear. If you remove the Sequence inside of the activity and put the action you want to take in its place, the action will be taken before checking if the element has appeared (essentially running the activities in reverse).

Make sure you leave the internal Sequence for the activity in place when using On Element Appear.

Alternatively, as lakshman suggested, you can use Element Exists, and use an If statement to check if it returned true. If this is true, use a Click activity to close the message box.

@Nelson.R

If element exists then it will give true right. After this use IF activity and in Then part use Click activity and indicate that pop up to close it.

I tried the if statement doesn’t work with the click or send hotkey activities. Also the robot does not recognize the “OK button” as a button so trying to avoid click activities as best as possible with this application.

Problem I am facing is that the Message takes a few seconds to appear. I for some reason get the value true before the message box visually appears on screen. Tried validating when I closed the message box myself to see if the robot was picking up another element but this does not seem to be the case.

Also I am confused about your explanation.

what what do I have to do you mean by "put the action you want to take in its place?

This is how I created the activity when getting the problem.

Ok, so you do have the sequence there, which is good. I have tried removing the sequence and dropping the activity in by itself, and that would cause errors.

In your case, set the WaitForReady to Complete to make sure it has completely loaded. If this does not work, look for an attribute of the window that indicates if the window is currently visible. If this is not available, then you will need to add a delay. The delay should be a last resort, however.

the only options I have for the On Element Appear activity are RepeatForever, WaitVisible and WaitActive.

I see WaitForReady here
image

Oh, thought it was a property that was under Options and did not see that I had Target minimized. Sadly it still does not work. Thanks for the assistance.

I am also having this issue, but it goes inside the On Element Appear, runs everything inside and then fails saying “activity timeout exceeded”. Why is it doing this after successfully performing all contained activities?

2 Likes

Use Click activity. Once this is done, edit the selectors accordingly to capture the right anchors of the click activity. This should work.

1 Like

Hi avalent. I am also experiencing this issue. Did you manage to resolve this?

Hi Guys,
I am having this issue today :frowning: Did anyone find a resolution?

Not sure about resolution or solution, but also have observed this same exact behavior today.
Now the question is, is this the intended behavior?
So what I observed is that the “On Element Appear” Activity has to already be running (stepped / executed) in order to detect and trigger when the Element actually appears. If the Element has already appeared and then the “On Element Appear” Activity is executed, then it does not work and times out. Overall, seems to be an odd behavior, but then again, we also have the “Element Exists”, so they appear on the surface to be contradictory, but it does say “On Appear”, so it has to be in the proper State in order to detect when “something appears”. If it is already there, then it cannot appear, as it already exists.
Given all that, you will have to ensure that your flow/logic is already executing the “On Element Appear” Activity and sitting and waiting for the Element to actually show within the allotted timeout period.

There is error in selector first fix it…
Make repeatforever property as False
Timeout as readytocomplete

Hi Scott, i have observed the same: if the element already exist when OnElementAppear runs, it will show a timeout error.
I dont know if this is an activity bug or is supposed to be like that.

What we’ve done is create a ‘common’ library which we put in workflows that are common to lots of our projects. It contains mainly extensions we’ve added around UIPath activities

In that we have an ‘UntilElementAppear’ workflow we’ve built that uses ElementExists activity in a loop, so UntilElementAppear exits returning true if the element occurs or false if a timeout is reached. Seems to work well.

Tried using Set Focus activities instead? I assume the element/UI already on screen but for some reason the click/enter key not working and resulting timeout error. Using set focus activities to focus on the element/UI then click/enter may help.

I was facing the same issue before I could ignore the timeout and increase the processing time.
I have used On Element Appear in Parallel Activity where based on macro execution I can expect multiple popups on completion of the macro i.e. success or error which different messages and Ok button.

To ignore the timeout and proceed I made ContinuOnError as True as I know only 1 message will come post macro execution.
Ignoring default Timeout i.e. 30secs I updated for every activity which is causing Timeout.

I have given the snapshots of each activity. Hope this helps.

Since I am new user I am not allowed to upload more than 1 screenshot so attaching only 1

1 Like