# ✏️ Creating and Editing Selectors

> **Parent page:** PAW Robot/Studio › Selector **Audience:** RPA Developers **Prerequisites:** Project open


---

## Overview

A **Selector** is the expression that identifies a UI element. Different selector formats are used on web, desktop, SAP and Java platforms. Selector quality is critical for reliable automation.

**What you will learn on this page:**

* Selector creation methods
* Selector components
* Fine-tuning and troubleshooting


---

## Selector Creation Methods

| Method | Description | Recommended |
|--------|-------------|-------------|
| **Select** | With **Select** in the Selector window, the target element is picked on screen (Ctrl + click); the Selector is generated automatically | Yes         |
| **Selector window** | Visual editing of an existing Selector | Yes         |
| **Manual** | Writing directly into the activity properties | Use with care |


---

## Selector Components

| Component | Description |
|-----------|-------------|
| **Selector** (root item) | Automation type (Windows, Browser, SAP, Java) |
| **Selector expression** | Namespaces that identify the element |
| **Timeout** | Time to wait if the element is not found (TimeSpan, e.g. 00:00:30); 30 seconds if left empty |


---

## Platform-Based Selector Examples

| Platform | Typical attributes |
|----------|--------------------|
| Web (Chrome) | tagname, id, Name, type, xpath, cssselector |
| Windows (UIA) | AutomationId, Name, ClassName |
| SAP      | Id, Name, Role, Path |
| Java     | role, Name, IndexInParent |


---

## Selector Fine-Tuning


1. Click the **Open Selector** button in the activity (if a selector exists, e.g. **Edit Browser Selector**)
2. The Selector window opens
3. Remove unnecessary attributes (dynamic IDs, etc.)
4. Test with **Highlight** that the element can be found
5. Save

 ![Selector Window](https://outline-production-attachments.s3-accelerate.amazonaws.com/uploads/a406920a-3878-4f5f-8f8b-7593ba62e617/24af64a6-7d4f-49fe-b9dc-3998c7b630da/en-selector-eng.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=AKIA4EOUDTOVUICLPZ4P%2F20261123%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20261123T234500Z&X-Amz-Expires=86400&X-Amz-Signature=6ad75601b74f9f052b4578840c965a69ef96519836e4d7896ef7919e1b989750&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject "left-50 =800x525")


---

## Vision / OCR

In some scenarios where the Selector is insufficient, **Vision template** or **Get Element Value With Ocr** can be used. Template lifecycle management is supported for image recognition-based reading.


---

## Common Issues

| Issue | Possible Cause | Solution |
|-------|----------------|----------|
| Element not found | Wrong or outdated selector | Recreate it with **Select** in the Selector window |
| Sometimes works, sometimes not | Dynamic ID or timing | Increase the **Timeout** value, simplify the selector |
| Does not work in a different environment | Environment differences | Environment-specific selector or conditional logic |