Skip to main content
Roberty Studio
RPABrowser

Get element HTML

Get element HTML

Reads and returns an element's inner HTML from the browser's page. Use it when you need a component's complete HTML structure for later analysis or processing.


Options​

Select the action​

Where the element comes from.

An element in the browser​

Reads the element's inner HTML using a CSS selector.

Browser or page ID​

The browser, tab or iframe opening action the element is in.

Element selector​

The CSS selector identifying the element on the page, div#result for example.

An element already selected​

Reads the inner HTML of an element captured earlier by a Get element action.

Element ID​

The action that captured the element whose inner HTML is read.

One item from a selection of multiple elements​

Reads the inner HTML of an element from a list captured by a Get elements action.

Elements list id​

The action that captured the source list.

Enter the index of the list​

The element's position in the list. The index starts at 0.

Returns​

Javascript code​

js
actions["action-id"].value // the element's inner HTML (Text)

Field selection​

  • value — the element's inner HTML, every child tag included (Text)

Rules and conditions​

  • Select the action has to be set before the other fields.
  • In An element in the browser mode, Browser or page ID and Element selector are both required.
  • What comes back includes every child tag, preserving the inner DOM's full structure.
  • If the element is not found on the page, the action ends in an error.
  • If the element is empty, the return is an empty string.