Docs

RunMacro Documentation

Create your first robot, then go further as needed.

Clear step-by-step guides to create, run, and improve robots for repetitive computer work.

Docs Browser Close Tab
✖ Browser

Close the current tab in background Chrome (CDP)

The Close Tab command closes the active tab of background Chrome.

Prerequisites#

  • Add Close Tab to the macro.
  • Prepare the data or target that Close Tab will use.

Supported modes#

  • Browser Mode

What it does#

The Close Tab command closes the active tab of background Chrome. For safety, if only one tab remains, RunMacro navigates it to about:blank instead of closing Chrome entirely.

Screenshots & video#

RunMacro Close Tab command configuration dialog showing parameter fields
Configuration dialog and parameter fields for the Close Tab command in RunMacro.

When to use it#

  • Clean up a side tab after extracting data.
  • Close an ad/popup page opened in its own tab.
  • Keep the window tidy across many loops.

When not to use it#

  • Do not close a tab with unsaved form state or an uncertain target selection.

Configuration steps#

  1. In Browser Mode (CDP), select the right tab with Switch Tab if needed.
  2. Add the Browser › Close Tab command.
  3. Save.

Expected result#

After execution, Close Tab completes the described action and makes its result available to the next step.

Real example#

Example: close the lookup tab#

  1. Switch Tab → the side tab.
  2. Close Tab.
  3. Switch Tab → 1 to return to the main tab.

Limitations and failure cases#

  • Closing destroys tab session state and can change the active target; last-tab/extension behavior depends on Chrome.

Tips & common mistakes#

The command has no options — it always closes the currently selected tab. Use Switch Tab first to target the right one.

Verification details#

  • commands/browser.py
RunMacro robot

Robots do the work. Your time is yours.

Create a robot in minutes, no coding needed. Reliable execution, remote management, transparent costs — and you always stay in control.