Attended process runs first time but fails second time (Java application)

The problem is with a Java application. I have read the Java troubleshooting guide and everything appears to be in order.

Creation of the process was straightforward and all Java elements were recognized.

The first time I activate the attended process it works fine but it never works a second time. The error is :-
Get Userid : Cannot find the UI element corresponding to this selector:

(XXXXXXXX is actually the company name which I am protecting)
From this point UiPath no longer identifies individual elements. Even unloading the process, closing and restarting UiPath, closing and restarting the application does not work. The only way to make the process run (once!) is to reboot the PC.

Any help would really be appreciated as this is part of a POC project!

The full error is :-
Get Userid : Cannot find the UI element corresponding to this selector:
wnd app=‘jp2launcher.exe’ cls=‘SunAwtFrame’ title=‘XXXXXXXX FINANCE PLC’ />
java name=’ ’ role=‘internal frame’ virtualname=‘WINDOW0’ />
java idx=‘2’ role=‘text’ virtualname=‘BLOCK2_USERNAME_0’ />

Hello @eamonnjoe,

Please, check your selector. You can use UiExplorer for improving your selector

Here are some tips of how to improve a selector in Selector Editor or UiExplorer:

  • Replace attributes with volatile values with attributes that look steady and meaningful
  • Replace variable parts of an attribute value with wildcards (*)
  • If an attribute’s value is all wildcard (e.g. name=’*’) then attribute should be removed
  • If editing attributes doesn’t help, try adding more intermediary containers
  • Avoid using idx attribute unless it is a very small number like 1 or 2


1 Like