Can´t identify window anymore when the process is executed, but identifies it as element when creating the robot!

Hello everyone,
I ran into an error, which I don´t understand. I´m trying to attach a window in a process. When indicate it on screen UIPath identifies it as an Element and creates a valid selector. When I start the process, UIPath can´t identify it anymore.

Same thing happens when I try Close Application. Even tried Click Image for the closing button and some further different things, nothing worked. Maybe you can help!?

Thanks for your answers in advance!

Buddy @cnstntn

Welcome to UiPath community buddy

1… Buddy whenever you select a element while developing a workflow, with attach window activity the element will get selected as you say…but while running the bot, we need to make sure that we must have that application in foreground, that is it should be visible in the screen,needs to come forward and should not run in background…if it runs in background, the bot may not be able to find the element in the screen as it is behind an another application…so make sure the application is in foreground and not in background…for that use a activity called open application and then select the desktop application as a element and then place the actvities within it
2. Buddy when we are trying to close an application of a desktop applicatin , we hve an activity called close application and you can keep that in the open application placing at last in the sequence of activities within the open application activity
or you can use send hot key activities being inside the open application activity, with keys Alt+F4…that would also close that application…
But all these things need a application to be foreground only then the bot can see the elements and make some progress
Hope this would help you buddy

Hi there…! Welcome to uipath community!

  1. If you are attaching a browser/window make sure you select it from the top and validate the selector and if the title is dynamic then make sure you use wildcard for the dynamic part of title or any attribute for that matter.
  2. Use the same window variable if you want to continue working in a different workflow.
  3. For Uipath to identify the window it must be open and better to be in the foreground so use ‘show window’ activity to activate it and bring it on top.
  4. While indicating the element make sure you are not selecting frames, directly go to the window. Rarely does it happen but I have seen that sometime only the title might be captured by the selector so you might end up with an incomplete one.

However for closing application:

From the above image you can see that app name, class etc are being captured, make sure you uncheck title and class checkbox to make it generic or you can keep title if you want only that to be closed.

Hope this solves it.


Hi, thank you for your fast replies.
The window is visible and in foreground, even though I tried Show Window activity to activate the window again and also checked the selector, but still the same problem.

I solved it with an anchor based activity and clicking action to activate the window and the send hotkey alt+f4, but this solution is very slow and instable.

Do you have any further ideas, what could be the problem?

Best regards


What is the application? Desktop or web application?

Can you share with us the selector and maybe your xaml (remove sensitive info) so that the issue can be further dissected…