"The Ui Element is no longer Valid" in Firefox . Selector correctly highlighted by UI Explorer but unable to be validated

This bug is very similar to this one.

The behavior is unconsistent. The error happens from times to times, and I have no clue why.

However the fix ctrl+F5 (refresh after emptying cache) does not work.

I’ve highlighted an element in a firefox window and correctly edited the selector. The UIPath extension is enabled in the browser.

UI Explorer highlight the right field, but says that “The Ui Element is no longer Valid” if I try to validate the selector! Same message at runtime.

Screenshots below:

Here is a simple MWE that illustrates the problem.BugMWE.xaml (6.9 KB)

Hi @P_Botrel

The problem could be that you use an empty “Attach Browser” activity within your “Open Browser” activity. What happens when you switch the “Type Into” activity in the “Open Browser” scope and delete the “Attach Browser” (it is actually not needed when you are alread in another Browser scope.

1 Like

Thanks!

My attach browser activity wasn’t empty, it also add as an input the browser element that Open Browser
It now works, but I’m still perplexed by the behavior of Ui Explorer.

Worse is that if I launch again my MWE, it works as well.

I’ve been confronted with a lot of unconsistent behaviors those past hours (e.g. execution results vary a lot).

It turns out this is not the solution… The behavior is unconsistent, and attach browser or not, I still encounter the error.BugMWE.xaml (6.9 KB)

Sorry but I can only guess because I do not use Firefox.
What I can see in you xaml is that the selector for the “Type Into” activity is just pointing on the Firefox itself. So, it could come to some trouble if there are more tabs/windows open.
Furthermore, pay attention that you are automatically logged in when a new browser window is opened.
Otherwise, only use “Attach Browser” and point to the already open page where you are logged in.

1 Like

I think that it could be the issue. While the UI Explorer would highlight whatever was at the forefront, the code has probably other criteria of selecting windows and if multiple windows that fit the selector are open, then that creates the problem.

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