CDP Copy Text Command Reference (Virtual Clipboard)
Browser ModeRunMacro 3.5+
The CDP Copy Text command reads text from a web page in Browser Mode (CDP) and stores it in the virtual clipboard or a variable.
Dialog & quick setup

- In Browser Mode (CDP), add Keyboard › CDP Copy Text.
- Choose the source: selection / selector / focused input.
- For selector, enter the selector; set a result variable if needed. Save.
Options reference
Modes & when to use
Browser Mode
Always writes text to the context virtual clipboard and additionally to a variable when configured.
Best for
- Grab a web element content (price, code, status) to process.
- Read data in the background without touching the real clipboard.
- Save text into a variable for a later step.
Use an alternative when
- The workflow runs only in Desktop Mode.
- Structured extraction or complex iframe/shadow-DOM handling is required; Smart HTML is more appropriate.
- The selector is unstable or the target is outside the current CDP page context.
Before you run
- The workflow runs in Browser Mode with an active CDP driver.
- Selector source has a valid CSS selector; selection or focused-input source has matching page state.
- The result variable name is valid when storage beyond the virtual clipboard is needed.
Example workflow
Example: grab a product price
- CDP Copy Text: source = selector
.price, variable =price. - Use
{price}in later steps.
Expected result: Text from the selection, selector, or focused input is written to the virtual clipboard and optionally to the result variable.
Tips & limitations
Runs only in Browser Mode (CDP). This is the background version of Copy Text — use it to grab web data without taking the clipboard/mouse.
- The command fails outside Browser Mode or without a CDP driver.
- A missing selector or empty selection can produce an empty string.
- Iframes, shadow DOM, cross-origin content, or dynamically replaced elements may require different targeting.
Applies to RunMacro 3.5+ · Browser Mode · Windows 10/11
