Skip to main content
Roberty Studio
RPABrowser

Get element

Get element

Finds and returns a single HTML element on the browser's page from a CSS selector. The element it gets is then available as an input to the robot's other actions.

tip

Use the Roberty Automation browser extension to capture an element's CSS selector in one click, without inspecting the HTML by hand.


Options​

Select the action​

Where to search.

An element in the browser​

Searches for the element straight on the page.

Browser or page ID​

The browser, tab or iframe opening action to search in.

An element already selected​

Searches for the element inside the scope of a parent element already fetched by a Get element action.

Element ID​

The earlier Get element action to use as the search context.

One item from a selection of multiple elements​

Searches for the element inside one item of a list captured by a Get Multiple Elements action.

Elements list id​

The Get Multiple Elements action to use as the source list.

Enter the index of the list​

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

Element selector​

The CSS selector identifying the element, button#btnConfirm for example. In An element already selected and One item from a selection of multiple elements modes, the search happens inside the parent element.

Element state​

Only available in An element in the browser mode. The state the element should be in before it comes back: Visible, Invisible/Hidden, Not present in the DOM or Present in the DOM. Default: Visible.

Timeout​

Only available in An element in the browser mode. How long, in seconds, the robot waits for the element to reach that state. Default: 120.

Returns​

This action has no return fields. The element it gets is available through this action's ID in the Element ID field of the browser actions that offer An element already selected mode, such as Click and Type text.

Rules and conditions​

  • Element selector is required in every mode. In An element in the browser mode, Browser or page ID has to be filled in too.
  • In An element already selected mode, Element ID is required, and the element is searched for within the parent's scope.
  • In An element in the browser mode, the robot waits for the element to reach the configured state before carrying on. If the timeout is exceeded, the action ends in an error.