instanceAffinity='1' added to selector during runtime and causing selector not found error

I am experiencing a problem with a selector used for “click” activity. The selector in my project looks like this:

It has worked until now. However, after upgrading the package dependency for UiPath.UIAutomation.Activities to 22.10.5 I am suddenly receiving the following error when running my process from Orchestrator:

System exception: Could not find the UI element corresponding to this selector: < rdp app=‘mstsc.exe’ cls=‘TscShellContainerClass’ instanceAffinity=‘1’ title=‘*Remote Desktop Connection’/> <wnd app=‘explorer.exe’ cls=‘Progman’ title=‘Program Manager’/ > <wnd cls=‘SysListView32’ title=‘FolderView’/ > at Source: Click RDT

Here, instanceAffinity=‘1’ suddenly is added to the selector and causing the exception.

I could only find the following topic with a similar problem: UIPath 2022.4 Open aplication Activity - Could not find the UI element corresponding to this selector

However, the solution here is to downgrade the package dependency, which I do not wish to do, since this is not a stable solution.

Any help would be greatly appreciated.


I hope you are using remote runtime as well…can upu try changing the selector or including more attributes which might be reliable…or add instanceaffinity=‘*’ and try once

Hope this helps


Hi @msj ,

If it worked until the upgrade of the UIAutomation package dependency to 22.20.5, it means UiPath Remote Runtime is installed on the remote machine, but probably with the version corresponding to the version of the UIAutomation package you previously used.
If you updated the UiPath.UIAutomation.Activities package for the process running on the Studio/Robot machine, you also need to update UiPath Remote Runtime on the remote machine. More details are available in this doc page:


Thanks, Luiza! I will try to upgrade the Remote Runtime and let you know if it solved the issue.