Beginners trouble - loop that ends too quickly

Hi everyone. I am just beggining my adventure with UiPath so probably my question can be easly resolved.

Currently I am creating automatization for applicaion running under Citrix environment. Program have to find image, cick on specified button, read number on a pop up window and press another button - and repeat process n-times.

I’ve succesfully created a proper loop however - after about 50 iterations it breakes with error 255.

Currently I have no idea what can be the problem, I tried to adjust screen capture but it doesnt help. My loop breaks each time after 50 or 70 iterations.

If any of you knows what may cause the problem please help me :slight_smile:

I have the same problem… did you figure it out?

Strange…!! what error you are getting? have you checked log?

If you are not getting any exception then check the count on which loop is running.


Well, I sloved the problem - it seems that in this case it was response time from application under Citrix. Since program is running under Citrix enviroment it is based on images.

I added DoWhile loop with ImageExists inside - it checks if image is visible before taking any more actions with it. Also maximizing the application screen seem to help.

I made similar DoWhile loop for PopUp image.

Currently robot is running without major issues.

1 Like

Also - I replaced clicking with keyboard shortcuts wherever it was possible

1 Like

I am working try catches and do whiles, in a state machine. The screenshot was not a big help either.
I believe the issue is that I’m working with Java Oracle Application and it might close up after such time. I’ll need to record video of error happening so I can mitigate with the images or error that pops up and then see how the application responds. Having to wait until the 60th or 70th iteration takes about 3.5 hours.

I’ll keep trying once I figure it out I will update. Thanks!

Sorry for the late update but
Here’s how It went down:
At around 450 image clicks within the loop, even after completing the whole sequence in the for each row. It crashed.
Replaced all possible clicks with hotkeys (Java environment) and CLICK OCR TEXT for anything that I could not access through hotkey or selectors.
Now works like a charm, running 24+ continuous hours downloading pdf files from server.

1 Like


Please also check these: