UIElement is no longer valid

Hello balupad14,
sure thing.
Mainly my robot is loosing track of the element. I have tried setting “Never” in “Website Data Settings” > “Check for newer versions of stored pages” (IE 11) as others recommended and will see if this help.

I need simply to download a file and its crash, one day I set it and everything is ok but the other day I need to show UI Path the element again. After logging, I need to choose an element (called token in inspector) which is a piece of image. In selector it is …=IMG’>, have tried multiple solutions and each seems to be unreliable.

There are more problems along the way but the biggest is that each day it needs some sort of the elements to be pinpointed again.

Thanks.

Hi @Robo1,

I understand the concept . But I need more detail . Can you share some screen shots or a link to analysis .
or share the selector.

Regards
Balamurugan

1 Like

Same issue please help…

The token I told you changes in periodically. At now it doesn’t shows up so as long as process is set “continue on error” this part works. But I show you latter I want to compare links.

I cannot set in settings “Never” in “Website Data Settings” > “Check for newer versions of stored pages”
because one of the pages doesn’t want to start showing dialog: “Link expired”.

Also I have problem with choosing the folder to “save as…” UiPath is sometimes loosing track of the “ToolbarWindows32” but if its not it doesnt want to open the path after “type into” showing “cannot opent this location with this program. Try to use different location”. Maybe because I want to save it in NAS. No idea.

Thanks.

It is in Polish

Here you are balupad14.

Image identificator looked the same two days ealier;

img style=“width: 500px; height: 100px;” alt=“Jesteś agentem/pośrednikiem lub pracownikiem TUiR WARTA lub pracownikiem TUnŻ WARTA? (Logowanie przez identyfikator zamiast tokena)” src=“/image/image_gallery?uuid=7ef2cdaf-ca06-4db9-b2ef-8b377ce03526&groupId=10157&t=1365753151523”

In UiPath the selector looks like this

Any ideas?

Hi @Robo1,

first I come to the download path. Instead of navigating the folder . you can specify the path directly.
You have an custom activity called “Download File” to download the file into the folder. that I have mention here. Normally we don’t navigate the directory to save the file.

Note : in the filepath property you have specify the full path like “C:\temp\4221525.xlsx”

Regards
Balamurugan.S

Hi @Robo1,

The second one. I am not sure , It will not show like as you mentioned. May be site can be updated. But I want to know the purpose of this. Are you trying to get link ?.

Still you are facing problem ?

I can able to find out the site that you are trying.

Regards
Balamurugan.S

Hi balupad14

So I need to rewrite the URL i this field? I cannot simply copy it and paste. Moreover I need to login to this link first everytime before I download it. Second The file is changing over a period of time. It is a great idea but i don’t believe its gonna work…

I´ve faced the same issue “UiElement is no longer valid”.

My solution was to increase “DelayBefore” for particular activity … (in my case it was “Click”)

What does this change indicate?

the reason behind this issue is the memory leak there might be a chance of using multiple activities into one sequence.If so then pls try to break into workflows

For web pages, I’ve faced the problem when background operations cause a part of the page to refresh which the element resides in. In that case it looks like neighter selector nor element works. Maybe there should be used a retry mechanism but it cannot be used for every activity, right? I think this should be considered as an issue by UiPath.

Is this still an concurrent issue ? Do we have a solution for it ?

For my part i was trying to fetch data from web page and write it down and when i faced the same exception discussed above. I was then able to avoid this exception by adding a delay in between every fetch. Hope it helps.

1 Like

Hi bubhu,

how long are your delays? How many second have you choosen?

AND, even more important: did it help? If yes, did you really wrote a delay in front of every browser activity with a selector? Or might there exist a smarter way of doing it?

@all: Further, a colleage of mine just mentioned to operate with “element exists” activity to solve the problem propperly. Did somebody of tried such a solution and did it work?

Thanks for helping!! :slight_smile:

Best regards
Simon

Its working but its not recommended

Now i have put 5 secs delay but lets assume one day the Internet speed slows down then 5 secs will not be enough. This is just practical scenario there could be many other different possible situation.

Better approach will be to use “element exist”

I am getting the same error message. &The uielement is no longer valid
This is my 10 test where I update value on front end and check it DB if value has been Update correctly and ETLd to another DB. On my 10 field test (different tests for every single field) I am getting this error message. It is so annoying. Has any one found solution? I am using Anchor Activities as text field I am updating do not have any unique ID or name. So adding delays is no an option for me.

Regards

I am having this problem too. Very, very frustrating.

I had this issue too… only way to solve this …you have use image activities or finding a unique selector

guys, any help with this error message.

UI Path relies very much on selectors, which helps identify objects at run time. This is why this property is very important. Some considerations to fix this.

  1. Check for usage of specific values. For example, if your property contains a name/value such as aaname=‘Contract 28322’, replace 28322 with an “*” to allow any contract. If not, unless your contract is 28322, it will not find it. Use UI Explorer to your help.

  2. Like someone said above, increase the Delay after/Delay Before settings. If you hover your mouse over delay after/Delay Before property you will be able to see the default value. 30000 = 30 secs. This is default in some cases and 300 is default in some. So you really need to make a determination of what the delay should be. In some cases, Timeout seconds needs to be set. Therefore, there isn’t one quick fix for all cases.

Some hints:
Use your judgment on how long a page refresh can happen.

Consider server delays.

Look for elements to appear in next page refresh, before you continue your process. Use ElementExists, Find Elements etc to fine tune. Use Try catch to capture timeout or any other exception.

A lot of times, when you use containers several properties are by defaulted from it. As you know, these container information are added by default when you recording using Desktop recording.

If you use container within container and your logic takes you in and out, selectors may change. For example, if you have a Attach Browser container and you use a Try catch within it, any exception that occurs will take you into one of the 'catch’s that handles it. If you have attached another Attach Browser container in there, unintentionally, partly because you attempted a fix by recording again and copy/pasted that sequence in here, then it will not find your object you referenced in the out container. I know it sounds confusing but you really have to pay attention to what can possibly go wrong. As much as possible, try to perform all activities within a sequence. If delays don’t work, use while loops to wait until certain element appears. For example, when you download files, the standard windows notification that pops up with “Open, Save, Save As” dialog marks the completion of download. Here timeouts will not work.

Hope this helps someone.

1 Like