Issue with "Element Exists" Activity Timeout

Hello,

We are facing an issue in production with the “Element Exists” activity. Although the timeout is set to the default value, the activity returns a “False” (element not found) result within just 1 or 2 seconds. But, when we check the exception screenshots, the element is clearly present on the screen.

This issue started today and the affected processes have been running in production for the past two years.

  • The issue is impacted for Edge browser-based automation but, these are many other Edge browser-based automations running without issues.
  • It is not specific to a single web application or a particular step in the workflow.
  • Studio/Robot Version: 2021.10.3
  • UiPath.UIAutomation.Activities Version: 20.10.8
  • Wait for ready is given as ‘Complete’ for these activities.

Has anyone else experienced similar issue with the “Element Exists” activity in Edge browser automation?

Thanks :slight_smile:

Hi @Jerry1,

Have you checked the selector for that element exists to review if it has changed?

Sometimes, change in selectors can also be the cause. Try to explore its attributes and see if it’s changed.

You can also try to run that automation in debug mode to see if bot is able to find that selector or not.

Doing above all these will help you troubleshoot the same.

Regards
Sonali

1 Like

Check the selector and also
Check the window title name is it generalised or having specific detail like any particular ticket number or detail

Cross verify selector
And in the proper set wait for page load to complete
@Jerry1

1 Like

Thank you for the suggestions. @sonaliaggarwal47 @jast1631

The “Wait for Ready” setting is already marked as “Complete” and the selectors are still valid and unchanged. Also, some transactions are getting completed using the same workflow/activity when the website elements load quickly.

During testing/debugging, we did not find any issues with the activity, the configured timeout is working as expected.

Hi @Jerry1,

How about including this element exists in a retry scope?

You can do something like below to introduce more possibility of not finding it.

  1. include element exists activity in retry scope
  2. set the condition as check true for element exists result variable
  3. include the number of retries you think would be enough. May be 3 or 5? Also provide the retry interval of may be 5 seconds or whatever you feel should be enough.
  4. set the continue on error property of retry scope to true.

Doing these steps would ensure your activity won’t fail right away, and most likely will get identified in one of the retries if was not picked initially by bot.

Hope this helps!

Regards
Sonali

Try putting the activity inside retry scope
Add 2 retry attempt with gap of 3 seconds and
Add activate window activity
This is classic activity

But add it prior to your activity @Jerry1

1 Like

Also try updating uiautomation package and system package version
If possible take to 23.4.5 series @Jerry1

1 Like

Hi @jast1631 ,

We currently have some limitations on immediatly updating the package version.

We are not looking for a workaround for this issue but are trying to see if someone else is facing the same problem. Also, the same version of the Ui Automation package is used for all automations in production.

Hi @Jerry1,

In that case, building a retry mechanism as I have stated in my above post should suffice.

Also check which version of edge extension is installed. If it’s too old, you can consider upgrading the same.

Regards
Sonali

1 Like

Try to add activate window activity prior @Jerry1

1 Like

Is this worked ? @Jerry1

Hi @jast1631

The “Activate” activity is already present in the code. Since we haven’t received any other solution, we are planning to implement a retry scope with delays to resolve the issue for now.

1 Like

Hi @Jerry1,

Yes, that should solve the problem.

Sometimes, issues like this can’t be explained or tracked down to its exact root cause. But usage of retry with proper retry intervals does help reduce/vanish these issues for sure. Please follow the points I have shared wrt retry usage(don’t ignore the point 4, its important - either you do this or you put retry scope inside a try-catch block else, if condition is not met even after all retries, its gonna throw an exception.)

We also follow this approach usually around the elements we can’t afford to fail to ensure more robustness.

Hope it would do the same for you as well.

Happy Retrying :slight_smile:

Regards
Sonali

1 Like