Target Selector = "The UIElement is no longer valid", but Relative Selector still accurate

I have a selector that has worked on a website for the past 3 months, but it broke a few days ago. Per the below, when using UI Explorer, the Relative Selector matches what I had, but the Target Selector displays an error.

Existing Selector: webctrl name=‘reference’ tag=‘INPUT’ /
Select Relative Element: webctrl name=‘reference’ tag=‘INPUT’ /
Select Target Element: “The UIElement is no longer valid”

Any ideas why this is occurring/how I can resolve it?

Hi @Colinx,
Unfortunately, not only you are experiencing this issue - please e.g. see the thread below:

Hello @PAD, thanks for the response! I had previously read that thread, and while it mentions UIElement no longer being valid, I didn’t explicitly see anyone mention how their Relative Element worked, but the Target Element didn’t.

Additionally, it looks like that thread doesn’t have an agreed-upon solution:

  • Removing the “idx” attributes (which I’m not using)
  • Clearing the cache (done multiple times)
  • Delete temporary internet files every time you open the web page (not practical)
  • Adding a delay activity (won’t resolve the root issue)

Maybe I overlooked something though…

Do you have problems like this in Chrome browser? I have seen that some sites when loaded using Internet Explorer have problems with elements becoming broken, but in Chrome it works as intended. This occurs usually when the elements have a parent selector as "<html />" with no title attribute available (using UiExplorer to test)… In Chrome, the parent selector has a title attribute, thus works better for those specific websites.

I feel as though UiPath has a little work to get some of these problem sites more supported, assuming that is what is going on here.

Regards.

Hi @Colinx,
Probably you have seen these threads and suggested actions too:

Changing website data settings - this was even marked as a solution by someone:

Retrying to click the element when the error appears:

We also maximize every window we work on, so all the elements are always in the same place… Sorry that I couldn’t help further.