Using Ui Explorer on a disappearing menu item - "The UiElement is no longer valid" error

Hi everyone,

In a system used by our customer we need to click on one of the menu items, but the selector created by “indicate on screen” is not good enough. I need to open this particular element in Ui Explorer to use some of “unselected items”. The problem is, when I go to Ui Explorer and try to use “indicate element”, what I get is “The UiElement is no longer valid”:

I presume the reason is, when I select the menu item, Ui Explorer window maximizes, the menu in the system in question closes, and so the element is in fact no longer valid. But I would presume such a sophisticated tool would be able to catch the selector before it disappears?

At first I thought this is a problem with the customer’s system, but now I see it can be easily replicated, for instance in MS Excel. Open Ui Explorer and try to get the selector for the “More colors” field:

It works when doing “indicate on screen” directly in the activity, but doesn’t work from withing Ui Explorer.

Any thoughts on how to get Ui explorer to show me this element’s selector?

Please mind I am not looking for a workaround like image matching or hotkeys, our customer is expecting a strong selector here.

Any help would be appreciated.


The problem is that UI Path does not recognize this element at all. In essence, the selector really does not exist for UiPath. The lowest level we can reach to drill down into this is the dropdown button (see screenshot below).

Your only options at this point are workarounds or using things such as Click Image, hotkeys, or clicking on screen coordinates, unfortunately.


try send hotkeys

in such a case we try to some more hints by doing screenrecording. Afterwards we do reworking on the result. But sending hot keys / commands is very reliable and to prefer in case you have a choice in particular steps

Well, the selector does exist - when you use “Indicate on screen” from within the “click” activity, you get:

What I need is to be able to edit this selector in Ui Explorer. Or possibly find another way to get the other attributes, the ones we usually find sitting in “unselected items” in Ui Explorer.

it was possible to do some actions
MoreColors.xaml (13.0 KB)

But it will not work at your end, due some selectors are in localized names. However have a look on windows ids.
Often after recording the bot will not go by the first run, so just repeat the failling steps and ensure:

  • have saved Excel (unsaved sometimes are acting different)
  • change to other monitors (in case of Multi monitors or swith to single)
  • use F2 key for pausings
  • use delays before /after (with longer timings just for explorations / analysis)
    often we have failings because the bot is too fast and not of wrong selectors. (15.5 KB)

Hi. My solution seams to work. The idea is to press muouse down on the dropdown icon first and then up on the target element (more colors). Please let me know if it helps on the target system as well.

1 Like

@Andrzej_Kinastowski OK, now I got the point. The task is to open this selector via UIExplorer and this is not possible. What I found out, it’s a limitation in UIExplorer. It will be fixed but unfortunatelly I don’t know when this is planned. I will find out and go back to this topic.

1 Like

Thanks everyone. As Arkadiusz wrote, the point was to be able to edit the selector in UiExplorer.

I have found a workaround, but this only works on slow machines:

  1. catch the basic selector within a “click” activity by indicating on screen
  2. click on the “Open in UiExplorer”
  3. immediately go to your applciation, and open the menu

if you were faster to open the menu than the UiExplorer window popping up, you will see your selector and will be able to edit it in UiExplorer and use “unselected items”:

This is just a workaround though, and I am hoping this bug gets fixed soon.



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