Docs

RunMacro Documentation

Learn RunMacro from basics to advanced.

Everything you need to start and master RunMacro — from basic commands to advanced automation workflows.

RunMacro robot
Docs Browser Switch Tab
🔀 Browser

Switch tabs in background Chrome (CDP)

What it does

The Switch Tab command moves the background Chrome focus to a tab by its index (starting at 1). Subsequent web commands act on the selected tab.

When to use it

  • After opening several tabs, select the right one to act on.
  • Return to the original tab after opening a side tab.
  • Alternate work between tabs.

Configuration steps

  1. In Browser Mode (CDP), add the Browser › Switch Tab command.
  2. Enter the tab index (1 is the first tab).
  3. Save and place it before the actions that should run on that tab.

Every option explained

Tab index

The tab position counting from 1 (left to right). E.g. 2 is the second tab.

Real example

Example: work on the 2nd tab

  1. Open a New Tab (becomes tab 2).
  2. Switch Tab → 2.
  3. Run Smart HTML on tab 2.

Tips & common mistakes

If the index is greater than the number of open tabs, the command errors out and stops (it does not pick another tab). An index below 1 is clamped to tab 1. Make sure the target tab is open before switching.
RunMacro robot

Ready to automate smarter?

Download RunMacro and start automating your desktop, browser, and business workflows today.