Closing 2nd tab in IE11 - arrggghhhh!

OK… I’ve tried EVERYTHING to attempt to close the 2nd tab…

  1. Using Send Hotkey - Ctrl-F4
  2. Using Send Hotkey - Alt-F & then c
  3. Using Click (Right-click) and then 3 down hotkeys and 1 enter hotkey

Nothing works - it always closes the 1st tab instead of 2nd.

I even tried using Mouse-click on tab’s X… sometimes it works. But then it fails (since it seems to pay attention to the tab’s address instead of the #2 tab).

Any solutions out there to easily close just the 2nd of 2 tabs. Or maybe closing all tabs but the first tab? (yes… I tried using right-click and close all but this tab (both with recording mouse and keystrokes… still no luck)

See attached.

  1. First image is the two tabs open at same time. The 2nd tab is a PDF export of info from first tab…

  2. Second image is the 2nd tab that I wanted to close, but it’s the one that stays open (the PDF export)

  3. Third image is the 1st tab that I want to be the one that is left open…

Nothing works. Thanks for any help.

Hey @macrodev

You can use “Ctrl+2” to go to the second tab and then you can use “Close tab” activity which will always close the current active tab from the browser.

you can also check this mentioned thread as well:


Actually… that’s my problem. Tab 2 IS my current activated tab. I even click on it again before trying to close it JUST SO I’M SURE that it’s the active tab. It’s still closes #1. But I will try the Ctrl+2. (more to come)… THANKS for the reply.

This is what I do to deal with multiple site windows/tabs…
Each time a new window or tab comes up I use “Attach Window” to store it into a Window Variable then I can use “Close Window” to close each tab. However, you might get the popup that asks if you want to close current tab or all tabs; just add another Click to choose Current Tab.

You can also put the selector in the Close Window instead of using the window variable.

This method works pretty consistently for me.


1 Like

WONDERFUL… Almost there. But how do I store the “Attached Window” into a Window Variable? Every place I try to store it, it comes up with an exception. Thanx!

Create a variable and Browse for the above Type Name. Then place that variable name in the Output parameter of the Attach Window activity.

Hope that helps!


1 Like

OK… I think I got it (almost)…

So, here’s my workflow…

Step 1… assign the Window variable to “curReportWindow”

Step 2…Set the UseWindow field to the “curReportWindow” variable for the Close Window activity

Step 3… you’re right the Close current tab question appeared. But why? I gave it the variable, didn’t I???

lol, yeah the “Do you want to close all tabs or the current tab?” popup is a feature of the browser. The Close Window activity is basically simulating you closing the window so it will ask that question. A Click activity should help bypass that.

Everything you did looks good from my perspective. Hope that works out for you.

If nothing works out, I don’t see Ctrl+W in any of your posts. May be your can try that.

You could also try “Attach browser” instead of Attach Window and create a browser variable in the same way, then in the Close tab activity use that variable. I just don’t use that method as much is all. Close tab will probably not prompt you.

Yes, like @vvaidya pointed out, Ctrl+W is shortcut for Close tab


You all are GREAT!!!

Hey, :slight_smile:

Sorry for being late, if you want to close a specific tab, you can use :
for second tab, and
for the third tab, and so on …