Kill specific Chrome window

Hey :slight_smile:

I have a question about the Kill Process Activity. I have two different instances of chrome running.

Both Processes are chrome.exe instances, but I want to close ONE specific window, not both.

What do I need to get to differentiate between the windows and how do I kill one specific window?

You can send hotkey Alt + f4 on an active window to kill it or use the close window activity

@JenJen
Did you try with Close Window activity?
Close Window will come under this package?

UiPath.Core.Activities.CloseWindow

Both solutions still trigger a Chrome popup saying “Do you want to leave this page?”

To avoid that I want to use kill activity :sweat_smile:

You can just use a click activity to close this pop up

If you’re using Modern activities, you can also utilize Use app/browser activity. Just set the property Close = always, and Open = never (if the window is already open). To target the correct window, you need to specify it with the window selector (or use UiElement variable).

Hi @JenJen

Try these activities

I hope it helps!!

I’m curious why you want to kill the window(s). It doesn’t really matter if Chrome is open, you can still open and attach to other windows, attach to whichever open ones you want, etc.

As mentioned before I want to avoid the popup showing up. Close Tab, Window, App etc do not tackle my problem, since they all trigger the popup.

To make it clearer:
How can I distinguish between chrome windows in kill process activity?

You can’t, because the Kill Process activity is intended to kill all the processes based on the name of the executable. You know it’s easy to just deal with the popup using a Check App State, right?

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