How to close browser tabs (safely)


#1

Hello guys,

I have a main page, which has links. I want to klick on those links, open new tabs and then close these tabs again. But I dont want to close the main page.
If I would do it with a shortkeys, there is always a risk that IE will not get it and doesn’t close the current tab.
In addition to that, sometimes IE does not open a new tab, so with a short key I would close my main page.
How can I make sure, that this process works 100%?

Thank you very much


#2

Hi @rpaNewbie,

you can use Ctrl+W to close current tab

if you want to close 2 tab alone
Ctrl+2w
if you want to close 3 tab alone
Ctrl+3w

Regards,
Arivu


#3

Hey @arivu96

my Problem is, that when I dont have a second tab, because it did not open the link, I will close my main page.
As far as I can see, Ctrl+2w closes the first tab, when there is no second one.

In short here is what I want.

Case 1: 2 or more tabs open
Close all tabs but the first one

Case 2: Only my main page open
Dont close any tab


#4

Hi @rpaNewbie
ok,
@Lavinia
Refer this post. based on url also you can check u r in main page or not.

Regards,
Arivu


#5

Hey there,
Use close Tab activity.
First use attached browser activity(trick is to attach proper selector) which returns browser variable as output that can be used as input to the close tab.


#6

Refer this post
using CTRL+9 it will go to the last tab and use Ctrl+w
like wise you can close other tabs. for more information refer below post.


#7

thanks guys, I will check it out

Edit: Thanks guys, that was exactly what I was looking for


#8

Hi @arivu96
It not working Fine on my scenerio

Hi,To close browser i have open 1 link in that sub , sub of sub link like 3 pages available now i want to close 3rd one alone and i need to available the 2 page to do certain Process to automate again and again

if i create the variable in open browser that should call in close tab means it will close by !st tab not as 3 tab here @arivu96

image