web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Close all browser tabl...
Power Automate
Unanswered

Close all browser table except first one

(0) ShareShare
ReportReport
Posted on by 7

Hi, I have a loop and at times there are extra tabs that are open.  I'm working through that and have steps to close this.  In case there are other tabs besides the first one, that needs to stay open, what step(s) can I run to ensure that all tabs are closed except the first one?

  • Gidi Profile Picture
    601 on at

    Hi, how about saving the browser instance of the additional tabs in a List variable? You then can loop through the list to close the instances accordingly.

  • mgd1317 Profile Picture
    49 on at

    Appreciate the reply.  I’m not sure how to do that unfortunately.  An example would be appreciated!

  • Gidi Profile Picture
    601 on at

    Here it is:

    PAD_Browser Tabs looping.jpgPAD_CloseBrowser Error Handling.jpg

  • mgd1317 Profile Picture
    49 on at

    Thanks for the insight.  I know certain URLs that will show up but sometimes the URLs are generated from different pages with many characters.  I do know the name/title but after that it can be many, many different things.

     

    Not sure how to integrate that reality into your example.

     

    Thanks again.

  • Gidi Profile Picture
    601 on at

    Hi,

    Create tab action also allows selection via Title/Name, but if I understand you correctly these tabs are opened automatically, or?

    Maybe you can share an example. 

    Perhaps a Get focused Window action will then help to get these tabs into a browser instance (with attach to browser) for further processing. 

  • mgd1317 Profile Picture
    49 on at

    Yes, the tabs are opened automatically by button selection.  This may or may not help but the selections/buttons are the same each time.  So maybe something tied to the UI element or something?  Sorry, I know I'm using the terms incorrectly.

  • Gidi Profile Picture
    601 on at

    ok, this might be individual, but perhaps the following gives some ideas.

    In my example I create new tabs by open links in a new tab, focus the new tab via Shortcut <CTRL>+<Tab> and attach it to existing browser instance and then maintain a list with the browser tab instances.

    PAD_GetBrowserTabs.jpg

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 430

#2
11manish Profile Picture

11manish 341 Super User 2026 Season 2

#3
M Bilal Khan Profile Picture

M Bilal Khan 282

Last 30 days Overall leaderboard