# Set Focus

This action can be used to set input (keyboard) focus to a particular control. The control does not have to be visible or in the foreground.

## **Properties**

![](/files/-MfcGmwwa9UK_kvNjibR)

### **Input**

**Identifier**: indicate a new UI element, or select from the already defined list of selectors. (TAP into our unique UI Browser).

![](/files/-MfcGpYv-s9uUNw-exyP)

### **Misc**

* **Display Name**: action display name in your implementation project.
* **Wait Before**: number milliseconds robot to wait before executing the action.
* **Wait After:** number milliseconds robot to wait until moving to the next action.
* **Abort on Error**: True/False
* **Retry Times**: Specifies the number of times to retry an action if it doesn't end successfully. Default value 0 (no retry); Use -1 if you want to retry indefinitely.&#x20;

## **Use Case**

### **Potential Use Cases**

* Set focus on a control from the same application page, but not currently visible
* Set focus on a textbox control before starting to type in it
* Set focus on a button in order to use a keystroke Enter to press it

### **Examples of Using Set Focus**

**Example**

In this example, the robot will set focus on a Notepad++ window and type a message.

Watch the robot in action:

{% embed url="<https://youtu.be/v5jYq8007Wo>" %}

You can see how the **Set Focus** activity is used in an example that incorporates multiple activities. You can check and download the example from here:

{% file src="/files/-MT1xsbVp9hkqB0\_hWR2" %}
Set Focus sample project
{% endfile %}

The article doesn't fully answer your question, or you want to find out more? Ask your question in the comments, on our community forum, or contact our support team or your account manager. Whatever works for you, your question will find its answer soon!


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.tailent.com/actions/tap-actions/control/set-focus.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
