Close Tab (browser)

Hi! In try catch:
Try: check mail on
certain message
Catch: close tab(chrome)

But I have error:
Try Catch: Cannot find the UI element corresponding to this selector:
Why?

Hi @RPA3

Can you fine tune the selector and check or use send hot key activity as Ctrl+W to close the tab

Thanks
Ashwin S

Hi
instead of Close Tab use KILL PROCESS activity and mention as “chrome” in ProcessName in the property panel

Cheers @RPA3

4 Likes

Use the attach browser activity and inside that use close tab activity, use browser variable which you get from the output of the attach browser as input to close tab and check…

1 Like

I don’t know why, but I tried all the ways, none worked for me

Check with this workflow,
Test_Sequence.xaml (4.8 KB)
And change, select the browser type as you need.

So it works for me, but in try catch not

are we running in debug mode kindly run in normal mode and check once pls
@RPA3

Can you tell me in brief , what are you doing in try and catch section??

Try: check mail on
certain message
Catch: close tab(chrome)

But I have error:
Try Catch: Cannot find the UI element corresponding to this selector:

Hi
is that TRY CATCH is placed inside a attach browser or attach window activity
@RPA3

Inside the catch use, attach browser and close tab.
Its working for me, it should work to you also.
And check whether your try section throws any error or not.

Can you attach an example? I have open Browser

Could you help me, please ??