DocsBrowserIF Target Exists

Check whether a CDP target exists (tab/extension)

Browser ModeRunMacro 3.5+

The IF Target Exists command scans background Chrome targets (tabs and extension pages) and checks if any matches: URL contains, Title contains, or Extension ID.

Dialog & quick setup

RunMacro IF Target Exists command configuration dialog showing parameter fields
Configuration dialog and parameter fields for the IF Target Exists command in RunMacro.
  1. In Browser Mode (CDP), add Browser › IF Target Exists.
  2. Fill one or more conditions: URL contains / Title contains / Extension ID.
  3. Set an IF Label and ELSE Label, adjust retry count and delay per try. Save.

Options reference

URL contains

Matches if the target URL contains this string.

Title contains

Matches if the tab/page title contains this string.

Extension ID

Only matches pages belonging to the extension with this ID.

IF Label / ELSE Label

Where to jump when a target is found / not found.

Max retries & retry delay (ms)

Repeat the check to wait for the target to appear (default 25 tries, 100ms each).

Modes & when to use

Browser Mode

Best for

  • Check whether an extension confirm popup has appeared.
  • Wait for a specific tab to show up before acting.
  • Branch depending on whether a target page is open.

Use an alternative when

  • Do not use an instantaneous check to wait for target creation; retry with a timeout.
Before you run
  • Add IF Target Exists to the macro.
  • Prepare the data or target that IF Target Exists will use.

Example workflow

Example: wait for a wallet confirm popup

  1. IF Target Exists: extension ID = wallet ID, URL contains notification.
  2. IF Label → HAS_POPUP: select & click Confirm.
  3. ELSE Label → NO_POPUP: skip.
Expected result: After execution, IF Target Exists completes the described action and makes its result available to the next step.

Tips & limitations

Increase retries/delay if the popup is slow to appear. Combine multiple conditions for a more precise match.
  • A target can appear/disappear immediately after the check; broad title/URL patterns can overmatch.

Applies to RunMacro 3.5+ · Browser Mode · Windows 10/11

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.