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 Smart HTML Smart HTML
🧩 Smart HTML

Automate web elements by selector (Smart HTML)

The Smart HTML command acts directly on a web element (button, input, link...) using a recorded smart selector instead of coordinates.

Prerequisites#

  • Add Smart HTML to the macro.
  • Prepare the data or target that Smart HTML will use.

Supported modes#

  • Browser Mode

What it does#

The Smart HTML command acts directly on a web element (button, input, link...) using a recorded smart selector instead of coordinates. It re-resolves the element via multiple signals (id, text, attributes, even Shadow DOM), staying reliable when the UI shifts. It supports many actions: click/type/hover, extract text/attribute/table, check, select dropdown, wait and assert.

Screenshots & video#

RunMacro Smart HTML command configuration dialog showing parameter fields
Configuration dialog and parameter fields for the Smart HTML command in RunMacro.

When to use it#

  • Automate a website precisely by element (no coordinate drift).
  • Fill forms, click buttons, choose dropdowns on the web.
  • Extract data (text, links, tables) from a page.
  • Run in the background via Chrome/CDP without taking the real mouse.

When not to use it#

  • Do not use it for Desktop apps, canvases without useful DOM, or unverified selectors.

Configuration steps#

  1. Use the element picker (Extension) to capture the target selector.
  2. Add a Smart HTML command and choose the action (Click, Type, Extract...).
  3. Choose the execution mode: Auto/CDP (background), Extension (active browser), or Real Mouse.
  4. (For Type) enter content; (for Extract) set a result variable. Save.

Every option explained#

Element selector (profile)#

The element fingerprint captured by the picker. RunMacro re-resolves it at run time.

Action#

Click / Double/Right Click / Hover / Type; Extract text, attribute, HTML, table, options; Check/Uncheck; Select dropdown; Wait and Assert.

Execution mode#

Auto/CDP runs headless via Chrome; Extension acts on the open tab; Real Mouse uses the real cursor (click/double-click/right-click/type/hover only).

Text + submit#

For the Type action: the content to enter; optionally press Enter to submit. Variables supported.

Attribute + result variable#

For Extract: the attribute to read (e.g. href) and the variable to store the result.

Timeout (ms)#

Max time to resolve/show the element before giving up.

Expected result#

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

Real example#

Example: fill a web email field then click a button#

  1. Pick the email field selector, add Smart HTML action Type, enter the email.
  2. Pick the "Continue" button selector, add Smart HTML action Click.
  3. Use Auto/CDP mode to run in the background.

Limitations and failure cases#

  • Selector, iframe/shadow context, and execution mode determine the target; DOM replacement can make the action miss.

Tips & common mistakes#

Smart HTML is more accurate than coordinate-based Mouse Click on the web — prefer it for Chrome.
Wait/Assert/Extract actions need CDP or Extension mode (Real Mouse is click/double-click/right-click/type/hover only).

Verification details#

  • commands/smart_html.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.