In this blog, we are going to discuss UiPath Close Tab Activity. Here we will discuss all aspects of this activity such as how to close single or multiple activities. This will be a very useful activity when you are working on automation that uses browsers and multiple tabs. In the end, if you want to close these tabs you shouldn’t do it manually. You just need to use this activity.

So before going into this activity in detail, you should need some basic knowledge of the below-listed topics before using these activities. such as:

What is UiPath Close Tab Activity

UiPath Close Tab Activities - RPA Tutorials
UiPath Close Tab Activity

UiPath Close Tab is a classic activity. This activity is mainly used to close a tab, which is beneficial when you are working on multiple tabs and some tabs are not required but are wasting your memory. In this case, this activity helps you to improve your memory efficiency.

As we mentioned earlier, it is a classic activity so before using this activity you have to enable classic activities on your uipath studio. This activity can help to close tabs that are causing clutter and negatively impacting your system memory by allowing you to close the tab, which is not required anymore automatically.

How to Use UiPath Close Tab Activity?

Now we will check how to use this activity on your UiPath Studio. Just follow the below steps to use this activity.

  1. Open your UiPath Studio Application on your System. Please create a new project or use the existing project to use this activity.
UiPath Activities Overview - RPA Tutorials
UiPath Studio Overview
  1. Before using this activity make sure to enable classic activities, if you didn’t enable this activity does not show or is missing.
  2. Now you have to drag and drop “Sequence Activity“. Sequence activity is a default activity in which all other activities are placed.
  3. Before adding this activity to your workflow you should need a browser and some tabs then only you can close these tabs.
    • Select a browser using the “Attach Browser” Activity and drag and drop this activity into your workflow. Now choose a browser such as Chrome, Firefox, Microsoft Edge and etc.
UiPath Attach Browser Activity
Attach Browser
  1. Search for the “Close Tab” Activity in the search box and drag and drop this activity After the Attach Broiswer activity.
UiPath Close Tab - RPA Tutorials
Close Tab Activity
  1. Now we can successfully implement this activity. Now run this project to check how it works.

How to Close All Tabs in Browsers?

In some time you need to close all tabs in a browser, the “Close Tabs” activity only allows a single tab to close. To get UiPath close all tabs, you have to use the Kill process or Close Browser. The killing process will kill the browser tab which you have specified. The close the browser will close the browser which you have mentioned. As the browser will be closed all tabs in that browser will automatically close.

You can also you “For Each” loop to close all tabs in a browser. This will help you to reduce overall memory usage. These methods can be used to close tabs in Firefox, Chrome, and Microsoft Ege browsers. You can also use this to close the second tab of your specific browser.

With the help of Send hotkey activity and the CTRL + W shortcuts, you can close the tab in a browser. 

Some Use Case Of UiPath Close All Tabs Activity

Now, let’s check some of the places where you can use this activity.

  • Closing unnecessary tabs
  • Closing a Specific Tab
  • Closing All Tabs

Properties Of Close Tabs Activity

Properties of all activities can be seen on the right side when you click this activity.

Package used

The package used in this activity is:

UiPath.Core.Activities.CloseTab

Input Properties

The input properties of this activity is:

  • Browser: It specifies the browser tab which you would like to close.

Common Properties

Some of the common properties available in this activity are:

  • DisplayName 
  • ContinueOnError 

Conclusion

We have discussed UiPath Close Tab Activity and with help of an example, we also demonstrated its working. Close Tab Activity is simply used to close a particular tab. We have also provided some use cases where you can use this activity.

Official website: UiPath Docs

Some FAQs in Close Tab Activity

How do I close the tab in UiPath?

In UiPath, you can close a tab activity by using the u0022Close Tabu0022 activity. This activity allows you to specify the tab you want to close

How do I close all browser tabs in Uipath?

The u0022Send Hotkeyu0022 activity can be used to send keyboard shortcuts to an application, such as the shortcut to close a tab in a browser, which is typical u0022u003cstrongu003eCTRL + Wu003c/strongu003eu0022 in most web browsers.