---
title: Selector (DOM element)
description: "# Definition A selector DOM (Document Object Model) element is used to locate and interact with specific web elements on a webpage. RTILA selector DOM element in web automation is a string of code that identifies a specific web element…"
url: "https://legacy.rtila.com/docs/selector-dom-element/"
updated: "2024-10-08"
category: Official Commands
---

# Selector (DOM element)

# Definition

A selector DOM (Document Object Model) element is used to locate and interact with specific web elements on a webpage. RTILA selector DOM element in web automation is a string of code that identifies a specific web element based on its attributes, such as its HTML tag, class, ID, or text content. It can be used to store an element in a variable and then call that element attributes, inner text, or inner HTML. The selector DOM element is a very useful element in RTILA web automation as it allows you to call data from specific elements in a web page and can be used to select the data of similar elements with the same selectors in a loop that goes through each element data and then these data could be called and used by the ID of the selector variable or {{Name}}

# Add & configure Selector DOM element

## Add

To add the selector DOM element, you will need to go to the variables tab of a new command interface and search for it. After finding the variable and adding it, you can edit its value and set some other configurations.

![](https://legacy.rtila.com/wp-content/uploads/2024/10/Selector-Dom.png)

## Configure

![](https://legacy.rtila.com/wp-content/uploads/2023/03/SEL-1.png)

1. This refers to the ID of the selector DOM element you can call later to get the value of this element
2. Edit the name of the static variable describing what value it would contain, this name could be used to call the element in {{name}} from.
3. Clicking on inspect allows you to inspect the CSS selector of the selector element
4. This clears the CSS selector field allowing you to inspect another CSS selector
5. CSS selector shows you the selector you inspected for the selector DOM element
6. Here you can choose what is the content of the selector that you want to use or call later on, and it has three options as shown
7. custom attributes in the selector DOM element can be used to identify and locate specific elements on a web page that do not have unique IDs or classes. This can be useful when automating tasks on a web page that has dynamic content or when the standard attributes are not sufficient to uniquely identify the element.
8. Image recognition in selector DOM element involves using computer vision algorithms to analyze the pixels of an image and compare them to a known pattern or template. This can be useful in cases where the element we want to interact with on a web page does not have a unique ID or class, and we cannot easily use traditional selector DOM elements to identify it.
9. This refers to the Language of the selector DOM element
10. A sequence of characters that forms a search pattern. For example, you can use regex to find all email addresses in a document or to extract all the numbers in a string.
11. This allows you to combine different pieces of data or text together
