Workflow utilising "for each row in data table" and "element exists" fails at certain point

Hello all,

I have a process whereby I extract a list of 1500+ records from Excel into a datatable, where a for each row in data table utilises find element to detect if a particular UI element exists.

  • If it exists, it creates a folder in my local drive, and moves on to the next data table.
  • If it does not exist, it ends for the particular row in the data table, and moves on to the next data table.

Following which, there will be a second set of flows that will be run on records with folders created.

When the flow was tested on a list of 10 records, the first set of flows ran flawlessly. The same applies when tested on 100 records.

However, when tested in batches of 500/1000/1500 records, the flow fails close to the 2 hour mark (sometimes failing close to 200 record mark).

  • The reason for failure is that the flow suddenly cannot detect the UI element.
  • I have inserted delays too, but it did not help

Has anyone encountered such issues before?

p.s. am pretty new to this hence I apologise if I take longer to understand.

Hi @a-y,

Here are a few suggestions you could try to address the issue:

  1. Increase the timeout period: You could try increasing the timeout period in your UiPath project settings. This could help ensure that the UI element is detected even if it takes longer to appear.
  2. Use parallel processing: If you are processing a large number of records, you could try using parallel processing to speed up the process. This involves splitting the data into smaller batches and running them in parallel, which could reduce the overall processing time.
  3. Optimize the UI automation process: Review your process and see if there are any unnecessary steps or delays that could be removed to improve efficiency. Additionally, you could try using different selectors or methods to detect the UI element, such as using “Wait for Element to Appear” activity instead of “Find Element”.
  4. Optimize system resources: Ensure that your system has enough resources to run the automation process. This includes checking CPU and memory usage during the process and ensuring that your system is not running any other resource-intensive tasks.

Hello @a-y ,

Welcome to the forum!

“suddenly cannot detect the UI element” Which is the activity you are getting this error?

If possible, please avoid using delays and start using checks like:

Best regards,


Thanks for the suggestions!

  1. This is the same outcome as the delays sadly, and also increases processing time.
  2. There are some steps requiring clicks on identified buttons and headers, will parallel processing work with that?
  3. Selectors have been re-selected to help with detection, and it works up to the 2hour/200 records mark before failing.
  4. Yes, aside from Chrome which this automation process is running upon and the UI Path software, there are no other resource-intensive tasks.

Hello @Marius_Puscasu ,

Thanks for the welcome!

The activity with this error is the “Click” activity and the “Element Exist” activity.

  • “Click” activity was used to navigate to the page, before using “Element Exist”.
  • I have also previously played with “Find Element” too, though ultimately “Element Exist” proved to be more stable hence used it.

Hello @a-y ,

I’m afraid you don’t need the click, find element exist or element exist activities. Just use the Folder Exists activity.

Also, I tend to believe that you should use the modern activities within your process


Best regards,

Set preserve format as true while reading range or increase cache size in excel application scope. Let us know it worked out or not

Thanks @Marius_Puscasu ,

The click activity is used to navigate to a page where a particular UI element is to be detected.
If detected, a folder is then created (folder does not exist before the detection).

I see, will investigate into the modern activities too! :smiley:

Thanks @Gaurav_Malhotra ,

Played with a couple of changes and it seems like changing my network, along with cache size works. I am able to run the flow longer, and it only stops upon encountering valid errors.

Will mark this as solution, thank you! :blush:

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.