UIElement is no longer valid

Who is to be blamed here , the Code or the Web App?

When I do Ctrl+F5 (force cache clear), it works fine ( Find Element > Click… Variable Selector)

1 Like

I’d wish I’d know :frowning:
@badita ?

1 Like

Bump.

Can someone please give the correct reasoning and resolution for this error message. In my environment this occurs sporadically on a specific website which I do not have control over.

This occurs at a specific location which is confirmation screen OK button. The OK button is not a dynamic selector.

UiPath.Core.Activities UiPath.Core.InvalidUiElementException: The UiElement is no longer valid ---> System.Runtime.InteropServices.COMException: Invalid UI node. at UiPath.UiNodeClass.FindFirst(UiFindScope scope, String nodeID) at UiPath.Core.UiElement.FindFirst(FindScope scope, Selector selector) --- End of inner exception stack trace --- at UiPath.Core.Activities.ScopeActivity.OnFaulted(NativeActivityFaultContext faultContext, Exception propagatedException, ActivityInstance propagatedFrom) at System.Activities.Runtime.FaultCallbackWrapper.Invoke(NativeActivityFaultContext faultContext, Exception propagatedException, ActivityInstance propagatedFrom) at System.Activities.Runtime.FaultCallbackWrapper.FaultWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)

1 Like

I am also facing the same issue while doing web automation.
Error:
{
“message”: “Invoke workflow file: Click ‘INPUT IsVehicleInsured…’ : The UiElement is no longer valid”,
“timeStamp”: “12:30:43”,
“level”: “Error”,
“fileName”: “Main”
}
I am doing data entry from excel to web application using parallel process activity
oftenly I face the above error message
Can some one help me to solve the issue

Thanks in Advance
Jothyprasanth M

1 Like

Same problem here.
I guess Andrzej explanation is good : Page auto refresh, but UiPath do not detect that. And then when trying to access to some object, uiPath throw an error saying elment is no longer valid.
Like several peoples here, i’d like to know how to handle this error.

Please some inside tech guy answer this :slight_smile:

1 Like

Bump.

Currently testing this setting in IE 11. Hopefully it fixes the issue.

image

8 Likes

Changing this setting worked for me on a very similar problem I was having.

1 Like

Having the same issue, and it bumped on me often.
It really seems like having something to do with cache.
For example, I was having a very simple automation to open a browser (Mozilla Firefox), it works for one whole day and several hours the next day morning, and then suddenly it crashed to this error. When I cleared Mozilla cache, it all worked fine.

Hoping there is better explanation on this :frowning:

Hi,

I’m having the same problem.
Changing my browser settings isn’t an option.
Is there an explanation for this problem already? I’m using a professional version of UiPath.

This one did it for me. Very nice! =)

Has anyone figured out a solution to this, other than changing the browser settings?

I am facing similar issue in “Type Into” activity in a web automation project. Current selector has been working well all this while and now fails sporadically (may work fine or may not if I try running the automation job in the next attempt)

Message: The UiElement is no longer valid

Source: Invoke - Customer Forms: Invoke- OpenCustomerForm: Type into 'INPUT - Email

Exception Type: InvalidUiElementException

UiPath.Core.InvalidUiElementException: The UiElement is no longer valid —> System.Runtime.InteropServices.COMException: Invalid UI node.
_ at UiPath.UiNodeClass.WriteText(String text, UiInputMethod inputMethod)_
_ at UiPath.Core.UiElement.WriteText(String text, InputMethod method)_
_ — End of inner exception stack trace —_
_ at UiPath.Core.Activities.InvokeWorkflowFile.EndExecute(AsyncCodeActivityContext context, IAsyncResult result)_
_ at System.Activities.AsyncCodeActivity.System.Activities.IAsyncCodeActivity.FinishExecution(AsyncCodeActivityContext context, IAsyncResult result)_
_ at System.Activities.AsyncCodeActivity.CompleteAsyncCodeActivityData.CompleteAsyncCodeActivityWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)_

Selector in use:

Upath version: 16.2.6274.33252.
Any help will be greatly appreciated.

Hi @dw_amitabh,

Use uiexplorer to get exact selector.
We can use 2 methods to make selectors dynamic:

Adding wildcards characters in selectors

  • Asterisk (*) – replaces one or more characters

  • Question mark (?) – replaces a single character

Refer the below link
Selectors with Wildcards

Regards,
Arivu :slight_smile:

Hi @arivu96 ,

I have not still undertood it!

I open an app and was able to selected the text and change it for a new value stored in a variable.

Therefore, when i tried do it again i have the following message: “Type into ‘billing.exe WIP’ : The UiElement is no longer valid”

Do you have any idea about to solve it?

best regards,

Leon

Same problem. As long as selectors are essentials in such automation loosing UiElement in web browser makes UiPath unreliable tool.

Why is this happen?

1 Like

Hi @Robo1,

Can you please explain your situation ? I have been using the UiPath nearly 7 moths. I didn’t meet this situation. I have done so many robot projects in web and window. I try to solve your problem… Here you have many people to help you.

Regards
Balamurugan.S

1 Like

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