Chrome: Automate "Close all tabs to the right"

Hi all,

It seems quite difficult to close Chrome tabs - There is an option right clicking on the tab, to “Close all tabs tot he right”.

Cant seem to find a keyboard shortcut for this - are we able to automate this, as it would be very simple as well.


can you explain your scenario more?

You can close the current tab using ‘Ctrl+w’
Do you want to close all the tabs except the one you are on right now?

Hi Chandan,

I only want to keep the 1st tab in Chrome, and close all of the tabs to the right thereof. Not sure how many tabs might open up, and even IF a tab opens up. So basically, I ONLY want to keep the one tab, initially “Open Browser” by me

@herman ,

I do not know any shortcut to do that, may be u can try clicking on the ‘Close all tabs to right’

Also check this below link if it helps:
Chrome keyboard shortcut to "close other tabs"? - Super User.

@herman Any common word in the title of all tab which will differ it with the first tab?


The common word should be “cookie*”. Does this help?

The use attach browser and then close tab activity…Just pass that browser variable to the Close Tab activity…

Make title in attach browser selector as cookie

right-click on the tab that you want to keep open and then click ‘close other tabs’.

Thanks @Pravin, I’ll test that!


UIPath doesnt recognise the tabs unfortunately.

Hi Chandan,

Thanks for the shortcut tip, but my organisation does not allow Chrome extensions to be downloaded.

Thanks, this seemed to have done the trick.

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