How to close window which does not contains Argument value in Selector

I want to close the Application window which does not have Defined Argument value in selector.
Means if Company does not contains FileName(Argument declared) value then close that window.

for this i used Close window activity.
image

Hi @nm09011985 ,

use element exists activity to check the condition if yes use close window activity.

Regards,
Arivu

Hello,

i tried to use Element exist but its not work for this condition.
is there any another way to do it.
I want to close the window which does not contains FileName (Argument Declared) in selector.

@nm09011985 try using close application activity.

you can indicate on file name uielement and use the condition to close!
or else you can do this
attach window for that particular tab or web screen and pass the output variable as closeBrowser
and use close tab activity and pass closeBrowser variable to it!
cheers

@nm09011985

If you are using above 2019 version Uipath then you can use regex pattern in selector

^((?!“+Filename.tostring.trim+”).)*$ matching:title=‘regex’

below is my selector and there i am trying to use the condition as Company: does not contains {{FileName}} then close that window.

image

@nm09011985

use my above code into you selector next to company text