# Close a specific EDGE window

**URL:** <https://forum.uipath.com/t/close-a-specific-edge-window/416629>\
**Category:** Studio\
**Tags:** uiautomation, activities\
**Created:** [April 20, 2022, 4:11pm UTC](https://forum.uipath.com/t/close-a-specific-edge-window/416629 "2022-04-20T16:11:10Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![alessandro.rocco](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/alessandro.rocco/32/177289_2.png) [@alessandro.rocco](https://forum.uipath.com/u/alessandro.rocco)\
**Post date:** [April 20, 2022, 4:11pm UTC](https://forum.uipath.com/t/close-a-specific-edge-window/416629/1 "2022-04-20T16:11:11Z")

</div>

Hi all,  
i have two windows open in MS EDGE, view pic below.  
how can i tell UiPath to close the one with named “nuova scheda - …”.  
i try with close windows but doesn’t work.  
the error is :Close Window ‘msedge.exe Nuova’: Could not find the UI element corresponding to this selector:  
  
but the window is open.

 ![image](https://global.discourse-cdn.com/uipath/original/4X/d/5/4/d54d8d160c735e30c938ac7a13bc481b3a719d04.png)

---

<div class="post-metadata">

**Author:** ![aman.sharma1](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/aman.sharma1/32/263731_2.png) [@aman.sharma1](https://forum.uipath.com/u/aman.sharma1)\
**Post date:** [April 20, 2022, 4:14pm UTC](https://forum.uipath.com/t/close-a-specific-edge-window/416629/2 "2022-04-20T16:14:17Z")

</div>

Please try using an Attach Window on the window you’re trying to close and place the Close Window activity inside the Attach Window.

---

<div class="post-metadata">

**Author:** ![lakshman](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/lakshman/32/523490_2.png) [@lakshman](https://forum.uipath.com/u/lakshman)\
**Post date:** [April 20, 2022, 4:30pm UTC](https://forum.uipath.com/t/close-a-specific-edge-window/416629/3 "2022-04-20T16:30:36Z")

</div>

@alessandro.rocco

Welcome back to our UiPath community.

Use **Attach Browser** activity and indicate that window and create one browser to it. And then use **Close Tab** activity and pass that browser variable to close it.

> **[Close Tab](https://docs.uipath.com/activities/docs/close-tab)**
>
> UiPath.Core.Activities.CloseTab Closes a browser page. Properties Input Browser - The browser page that you want to close. This field supports only Browser variables. Common DisplayName - The display name of the activity.ContinueOnError - Specifies...

---

<div class="post-metadata">

**Author:** ![ushu](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/ushu/32/463480_2.png) [@ushu](https://forum.uipath.com/u/ushu)\
**Post date:** [April 20, 2022, 8:04pm UTC](https://forum.uipath.com/t/close-a-specific-edge-window/416629/4 "2022-04-20T20:04:13Z")

</div>

@alessandro.rocco Can you share the selector of **close Window selector** here

---

<div class="post-metadata">

**Author:** ![Nithinkrishna](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/nithinkrishna/32/561519_2.png) [@Nithinkrishna](https://forum.uipath.com/u/Nithinkrishna)\
**Post date:** [April 21, 2022, 2:29am UTC](https://forum.uipath.com/t/close-a-specific-edge-window/416629/5 "2022-04-21T02:29:05Z")

</div>

Hey @alessandro.rocco

Kindly show the close window activity with props you are using…

Thanks  
#nK

---

<div class="post-metadata">

**Author:** ![alessandro.rocco](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/alessandro.rocco/32/177289_2.png) [@alessandro.rocco](https://forum.uipath.com/u/alessandro.rocco)\
**Post date:** [April 21, 2022, 9:55am UTC](https://forum.uipath.com/t/close-a-specific-edge-window/416629/6 "2022-04-21T09:55:23Z")

</div>

> [@lakshman](#):
>
> dicate that window and create one browser to it.

this solution doesn’t work, it fail in the attach browser activity, this is the message:  
Attach Browser ‘msedge.exe Nuova’: Invalid selector: . Expected a selector. Please make sure that you indicate a browser tab element.

the selector is created with indicate element in “ui explorer”

also when i select the windows always appear an error:

 ![image](https://global.discourse-cdn.com/uipath/original/4X/c/3/3/c33b6b426d8db2adaf32f2ec9c41b87cb9b225cb.png)

i’ve downloaded latest ui explorer, with latest edge extestion.

---

<div class="post-metadata">

**Author:** ![Nithinkrishna](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/nithinkrishna/32/561519_2.png) [@Nithinkrishna](https://forum.uipath.com/u/Nithinkrishna)\
**Post date:** [April 21, 2022, 9:56am UTC](https://forum.uipath.com/t/close-a-specific-edge-window/416629/7 "2022-04-21T09:56:58Z")

</div>

Hey @alessandro.rocco

You want to close an edge window or tab ?

Thanks  
#nK

---

<div class="post-metadata">

**Author:** ![alessandro.rocco](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/alessandro.rocco/32/177289_2.png) [@alessandro.rocco](https://forum.uipath.com/u/alessandro.rocco)\
**Post date:** [April 21, 2022, 10:02am UTC](https://forum.uipath.com/t/close-a-specific-edge-window/416629/8 "2022-04-21T10:02:47Z")

</div>

this is the selector:

![image](https://global.discourse-cdn.com/uipath/original/4X/b/8/3/b837af7d98fd94379d4a65eea37cf3119034d3af.png)

---

<div class="post-metadata">

**Author:** ![alessandro.rocco](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/alessandro.rocco/32/177289_2.png) [@alessandro.rocco](https://forum.uipath.com/u/alessandro.rocco)\
**Post date:** [April 21, 2022, 10:04am UTC](https://forum.uipath.com/t/close-a-specific-edge-window/416629/9 "2022-04-21T10:04:12Z")

</div>

edge window

---

<div class="post-metadata">

**Author:** ![alessandro.rocco](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/alessandro.rocco/32/177289_2.png) [@alessandro.rocco](https://forum.uipath.com/u/alessandro.rocco)\
**Post date:** [April 21, 2022, 10:06am UTC](https://forum.uipath.com/t/close-a-specific-edge-window/416629/10 "2022-04-21T10:06:20Z")

</div>

this are the props i’m using

![image](https://global.discourse-cdn.com/uipath/original/4X/1/1/b/11b6cc10409fc6b791a734eeba9f1ca7f366471b.png)

---

<div class="post-metadata">

**Author:** ![Nithinkrishna](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/nithinkrishna/32/561519_2.png) [@Nithinkrishna](https://forum.uipath.com/u/Nithinkrishna)\
**Post date:** [April 21, 2022, 11:04am UTC](https://forum.uipath.com/t/close-a-specific-edge-window/416629/11 "2022-04-21T11:04:05Z")

</div>

Hey @alessandro.rocco

Could you please expand the selector once and also show me the page screenshot from edge browser which you are trying to close.

Thanks  
#nK

---

<div class="post-metadata">

**Author:** ![alessandro.rocco](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/alessandro.rocco/32/177289_2.png) [@alessandro.rocco](https://forum.uipath.com/u/alessandro.rocco)\
**Post date:** [April 21, 2022, 1:56pm UTC](https://forum.uipath.com/t/close-a-specific-edge-window/416629/12 "2022-04-21T13:56:11Z")

</div>

this is the selector:  
 ![image](https://global.discourse-cdn.com/uipath/original/4X/f/a/d/fad702f8ce7853d81d1eaf78a0618c181cdbeff5.png)

this is the page:

 ![image](https://global.discourse-cdn.com/uipath/original/4X/1/d/6/1d69ff2e625075d35a6d9e107212f6e0e75bd5ec.jpeg)

otherwise, in the other window I have open, I would enter a text, or click an image, but if I don’t close the blank page , the edge extension always fails with an error.

The extension cannot automate the browser running with multiple user profiles.  
Restart the browser and use a single profile at a time.

---

<div class="post-metadata">

**Author:** ![ushu](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/ushu/32/463480_2.png) [@ushu](https://forum.uipath.com/u/ushu)\
**Post date:** [April 21, 2022, 8:59pm UTC](https://forum.uipath.com/t/close-a-specific-edge-window/416629/13 "2022-04-21T20:59:08Z")

</div>

@alessandro.rocco Can you try this and see

```auto
title = '*uova*'

```

or

```auto
title = '*sched*'

```

---

<div class="post-metadata">

**Author:** ![Nithinkrishna](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/nithinkrishna/32/561519_2.png) [@Nithinkrishna](https://forum.uipath.com/u/Nithinkrishna)\
**Post date:** [April 22, 2022, 3:02am UTC](https://forum.uipath.com/t/close-a-specific-edge-window/416629/14 "2022-04-22T03:02:00Z")

</div>

Hey @alessandro.rocco

Looks good for me. But unable to understand your point on user profile.

Kindly explain, you mean you are using two user profiles?

Thanks  
#nK

---

<div class="post-metadata">

**Author:** ![alessandro.rocco](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/alessandro.rocco/32/177289_2.png) [@alessandro.rocco](https://forum.uipath.com/u/alessandro.rocco)\
**Post date:** [April 22, 2022, 1:37pm UTC](https://forum.uipath.com/t/close-a-specific-edge-window/416629/15 "2022-04-22T13:37:24Z")

</div>

Hi Ushu,  
i try modifing the selecotor, with title = ‘_uova_’, it work with a single window , if there are 2 windows, it fails.

Close Window ‘msedge.exe Nuova scheda’: Could not find the UI element corresponding to this selector:

and the uipath edge extension fail

![image](https://global.discourse-cdn.com/uipath/original/4X/5/4/6/54617b6d0cda5f94ff60ff1fe1ee26bc696f5179.png)

---

<div class="post-metadata">

**Author:** ![alessandro.rocco](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/alessandro.rocco/32/177289_2.png) [@alessandro.rocco](https://forum.uipath.com/u/alessandro.rocco)\
**Post date:** [April 22, 2022, 1:40pm UTC](https://forum.uipath.com/t/close-a-specific-edge-window/416629/16 "2022-04-22T13:40:22Z")

</div>

hi @Nithinkrishna ,  
the problem is that if i have only one edge window the extension work well, if i have 2 windows open at the same time, the extension fail, with the error:

The extension cannot automate the browser running with multiple user profiles.  
Restart the browser and use a single profile at a time.

the profile is always the same

---

<div class="post-metadata">

**Author:** ![Nithinkrishna](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/nithinkrishna/32/561519_2.png) [@Nithinkrishna](https://forum.uipath.com/u/Nithinkrishna)\
**Post date:** [April 22, 2022, 1:57pm UTC](https://forum.uipath.com/t/close-a-specific-edge-window/416629/17 "2022-04-22T13:57:23Z")

</div>

So @alessandro.rocco as the error message say, you are using multiple profiles ?

---

<div class="post-metadata">

**Author:** ![alessandro.rocco](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/alessandro.rocco/32/177289_2.png) [@alessandro.rocco](https://forum.uipath.com/u/alessandro.rocco)\
**Post date:** [April 22, 2022, 2:30pm UTC](https://forum.uipath.com/t/close-a-specific-edge-window/416629/18 "2022-04-22T14:30:31Z")

</div>

no i’m using the same profile for all the pages.

---

<div class="post-metadata">

**Author:** ![Nithinkrishna](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/nithinkrishna/32/561519_2.png) [@Nithinkrishna](https://forum.uipath.com/u/Nithinkrishna)\
**Post date:** [April 22, 2022, 2:31pm UTC](https://forum.uipath.com/t/close-a-specific-edge-window/416629/19 "2022-04-22T14:31:42Z")

</div>

Hey @alessandro.rocco

Could you please try removing the profile itself once to check.

Thanks  
#nK

---

<div class="post-metadata">

**Author:** ![ushu](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/ushu/32/463480_2.png) [@ushu](https://forum.uipath.com/u/ushu)\
**Post date:** [April 22, 2022, 3:46pm UTC](https://forum.uipath.com/t/close-a-specific-edge-window/416629/20 "2022-04-22T15:46:28Z")

</div>

@alessandro.rocco **Can you trying using attach browser within that use close window activity with the given selector and see how it goes**

[Next page](https://forum.uipath.com/t/close-a-specific-edge-window/416629.md?page=2)
