Skip to content

Insert & Remove HTML ​

The Insert & Remove HTML field type allows direct DOM tree manipulation—either injecting custom HTML elements into a target web page or removing unwanted overlays, popups, and banners during automation.


Configuration Options ​

OptionTypeDescription
Selector QueryTextCSS selector or XPath targeting the reference DOM element.
Position of New HTML ContentDropdownWhere new HTML is injected relative to the target element.
Field Value / Default ValueText / HTMLThe HTML markup to insert (supports static text or Excel {$Column$} variables).
Remove exist element html before insert htmlSwitchClears the target element's existing inner HTML before inserting new content.
Remove elementSwitchCompletely removes the targeted element from the DOM (element.remove()). Disables insertion options when active.

Insertion Positions ​

PositionRelative PlacementDOM Result
beforebeginOutside the element, immediately before it.[NEW] <element>...</element>
afterbeginInside the element, as its first child.<element>[NEW] existing...</element>
beforeendInside the element, as its last child.<element>existing... [NEW]</element>
afterendOutside the element, immediately after it.<element>...</element> [NEW]
innerHTMLReplaces all inner content of the target element.<element>[NEW]</element>

Common Use Cases ​

1. Adding a New Option to a <select> Dropdown ​

Inject a missing <option> into an existing dropdown so it can be selected in subsequent steps:

  • Selector Query: select[name="category"]
  • Position: beforeend
  • Field Default Value: <option value="1000">1000</option>

Remove intrusive overlays or modal backdrops that block automated clicks:

  • Selector Query: .modal-backdrop, #cookie-banner, .popup-overlay
  • Remove element: ON

3. Injecting a Status or Alert Banner ​

Add helper notifications or instructions inside a page container:

  • Selector Query: #main-container
  • Position: afterbegin
  • Field Default Value: <div class="alert alert-info">Processing batch: {$BatchId$}</div>

Troubleshooting ​

IssueLikely CauseSolution
Content does not appearSelector failed to locate element or loaded lateInspect element using Alt + Shift + I. Add a delay before this field if element renders via AJAX.
Element not removedTarget is inside an iframe or selector didn't matchEnsure selector accurately matches and active iframe context is configured.
Duplicate content on replayLooping or re-running without clearing previous contentTurn ON Remove exist element html before insert html or use innerHTML position.