---
title: Focus On Element Command
description: "# Definition The \"focus\" command in RTILA automation tools is used to direct the user's attention to a specific HTML element on a web page. When a user interacts with a web page, the browser keeps track of which element…"
url: "https://legacy.rtila.com/docs/focus-on-element-command/"
updated: "2024-09-29"
category: Official Commands
---

# Focus On Element Command

# Definition

The "focus" command in RTILA automation tools is used to direct the user's attention to a specific HTML element on a web page. When a user interacts with a web page, the browser keeps track of which element has the "focus", which typically means that it's the element that will receive user input (e.g. when typing into a text field).

In RTILA, the "focus" command is typically used to set the focus on a specific element before performing an action on it, such as clicking a button or entering text into a form field. This can be useful to ensure that the correct element is being targeted, especially in cases where there are multiple elements on the page with similar attributes.

# Add & Configure Focus On Element Command

You can add the " focus on element command by searching for it in the action tab of a new command iterface. Once added you can edit it

![](https://legacy.rtila.com/wp-content/uploads/2024/09/Foucus-on-element.png)

![](https://legacy.rtila.com/storage/2023/04/FOED-1.png)

1. Set the name of the element you want to focus on
2. Clicking on inspect allows you to inspect the CSS selector of the element
3. This clears the CSS selector field allowing you to inspect another CSS selector
4. CSS selector shows you the selector you inspected or gives you the ability to enter one manually or edit it to get the right CSS selector for the element
5. Here you can choose what do you want to happens if the element is not found
