Close a specific EDGE window

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.

1 Like

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

@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.

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

Hey @alessandro.rocco

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

Thanks
#nK

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

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

1 Like

Hey @alessandro.rocco

You want to close an edge window or tab ?

Thanks
#nK

this is the selector:

image

edge window

this are the props i’m using

image

1 Like

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

this is the selector:
image

this is the page:

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.

1 Like

@alessandro.rocco Can you try this and see

title = '*uova*'

or

title = '*sched*'

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

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

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

1 Like

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

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

1 Like

Hey @alessandro.rocco

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

Thanks
#nK

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