Element Picker
The Element Picker is the visual tool that lets you select elements on a web page by simply pointing and clicking. Instead of writing CSS selectors manually, you click the pointer icon, hover over the page, and click the element you want. RTILA generates a robust selector automatically.
The element picker is available in two places:
- Data Extraction tab: Next to the selector input for the item selector and each property.
- Web Automation tab: Next to selector parameters in command configurations.
- Dataset Settings modal: Next to the item container selector field.
How to Use the Element Picker
Section titled “How to Use the Element Picker”Step-by-Step
Section titled “Step-by-Step”- Click the pointer icon (🖱️) next to any selector input field.
- Your cursor changes to a crosshair.
- Move your mouse over the page. Elements are highlighted with a red overlay as you hover.
- Click the element you want to select.
- The refinement panel appears, showing green highlights on all matching elements.
- Review the highlights:
- Click ✓ to confirm the selector for all highlighted elements.
- Click ✗ to exclude specific elements and refine the selection.
- The generated selector is inserted into the input field.
Starting the Picker
Section titled “Starting the Picker”The element picker can be started from:
- The pointer icon button next to any selector input.
- The picker activates for the specific input field you clicked.
- While active, the input field shows “Picking element…” as its placeholder.
Stopping the Picker
Section titled “Stopping the Picker”The picker stops when:
- You confirm or reject a selection.
- You click the pointer icon again (toggle off).
- You close the Visual Builder.
- You navigate away from the page.
Red Overlay Highlight
Section titled “Red Overlay Highlight”While the picker is active and you hover over elements, a translucent red overlay appears over the hovered element:
- The overlay has a 2px dashed red border.
- The background is semi-transparent red (20% opacity).
- The overlay is non-interactive — your clicks pass through to trigger selection.
- The overlay appears over all elements including text, images, buttons, and containers.
Note: The overlay does not appear over RTILA’s own UI elements (the refinement panel, recording controls, etc.).
Refinement Panel
Section titled “Refinement Panel”After you click an element, the refinement panel enters refine mode. All elements matching the generated selector are highlighted in green with green borders.

Refinement Controls
Section titled “Refinement Controls”Each highlighted element shows two small buttons:
| Button | Icon | Action |
|---|---|---|
| Confirm | ✓ | Accept the current selector for ALL highlighted elements |
| Exclude | ✗ | Exclude this element (and its structural siblings) from the selection |
Confirming the Selection
Section titled “Confirming the Selection”Click ✓ on any highlighted element to:
- Accept the current CSS selector.
- Stop the picking session.
- Insert the selector into the input field.
- Send the selector to the extension for further processing.
Excluding Elements
Section titled “Excluding Elements”Click ✗ on a highlighted element to:
- Identify the element’s structural position (parent, tag, classes, position).
- Find all structurally similar elements (same parent type, same tag, same position).
- Add a
:not()exclusion for those elements. - Re-highlight the remaining matching elements.
Tip: If excluding an element leaves zero highlights, the refinement resets and you must start over. This prevents creating invalid selectors.
Excluding Elements Workflow
Section titled “Excluding Elements Workflow”Here is a detailed example of excluding elements:
- You click on a product card. All product cards are highlighted green.
- You notice that ad cards are also highlighted (they have the same CSS class).
- Click ✗ on one of the ad cards.
- RTILA identifies that ad card’s structural position (e.g., it’s the 3rd
div.product-cardinside.container). - RTILA adds
:not(:nth-of-type(3))to the selector. - All ad cards at that position are removed from the highlights.
- Review the remaining highlights. Click ✓ to confirm.
Note: Exclusion works by matching structural patterns, not specific element content. If ads appear at different positions, you may need to exclude each position separately.
Selector Generation Logic
Section titled “Selector Generation Logic”RTILA generates selectors using a multi-strategy approach to ensure robustness. The generated selector is a comma-separated combination of multiple selector types:
Selector Format
Section titled “Selector Format”css=<css_selector>,xpath=<xpath_expression>,text="<text_content>"The engine tries each selector type in order and uses the first one that matches.
CSS Selector Generation
Section titled “CSS Selector Generation”The CSS selector is generated by walking up the DOM tree from the target element:
- Start with the element’s tag name.
- Add stable attributes if available (data attributes, aria-label, role, name, title, alt, placeholder).
- Add safe classes (non-dynamic classes).
- Add
:nth-of-type()if the element is not unique among siblings. - Walk up to the parent and repeat.
- Stop when the selector is unique on the page.
- Stop at
htmlorbody.
XPath Fallback
Section titled “XPath Fallback”An XPath expression is generated as a fallback:
- Start with the element’s tag name.
- Add
@idif available and stable. - Add stable attributes as predicates.
- Add position predicates if needed.
- Walk up to the parent and repeat.
- Stop when the XPath is unique.
Text Selector
Section titled “Text Selector”If the element has text content that is:
- Less than 60 characters
- Does not contain line breaks
A text="<content>" selector is appended as a third option.
Text Selection Mode
Section titled “Text Selection Mode”In addition to clicking elements, you can select text on the page:
- Click the pointer icon to activate the picker.
- Instead of clicking an element, highlight text on the page with your mouse.
- Release the mouse button.
- RTILA detects the text selection.
- A
text=<selected_text>selector is generated and sent to the extension. - The picker stops automatically.
Note: Text selection only works when you select a range of text. Single clicks still trigger element selection.
Tips Table
Section titled “Tips Table”| Tip | Description |
|---|---|
| Click precisely | Click directly on the element you want, not its parent container. |
| Use stable attributes | Elements with data-*, aria-label, or role attributes generate the most stable selectors. |
| Avoid dynamic content | Don’t select elements whose text changes frequently (counters, timestamps). |
| Use exclusion for ads | If ads share the same class as your target elements, use ✗ to exclude them. |
| Verify with the preview | After selecting, check the live preview to confirm the correct data is extracted. |
| Prefer containers | For datasets, select the parent container (e.g., the product card) as the item selector, not individual fields. |
| Combine with XPath | If CSS fails, the XPath fallback is tried automatically. |
| Text selectors are exact | Text selectors match exact text. Partial matches are not supported. |
| Test on multiple pages | Verify your selector works across different pages of the same site. |
| Avoid nth-child when possible | Position-based selectors break when content changes. Prefer class or attribute selectors. |
Iframe Support
Section titled “Iframe Support”The element picker works within the main page context only. If the element you need is inside an iframe:
- Select the element inside the iframe manually using the element picker (if the iframe is same-origin).
- The generated selector will be relative to the iframe’s document.
- In the command or property configuration, specify the iframe selector in the dedicated “Iframe” field.
- The engine will navigate into the iframe before applying the element selector.
Note: Cross-origin iframes may not be accessible for element picking due to browser security restrictions. In this case, you may need to type the selector manually or use the AI extraction feature.
Dynamic Class Avoidance
Section titled “Dynamic Class Avoidance”RTILA includes intelligent logic to avoid dynamic CSS classes that change frequently and would break your selectors. The isDynamic function identifies and skips these patterns:
| Pattern | Example | Why It’s Dynamic |
|---|---|---|
| Pure numbers | 12345 |
Generated IDs |
| Random alphanumeric (7+ chars) | aB3kF9x2 |
Hash-based class names |
| UUIDs | f47ac10b-58cc-4372-a567-... |
Unique identifiers |
| Long hex strings (10+ chars) | a1b2c3d4e5f6 |
Build-time hashes |
| Strings with 4+ consecutive digits | item12345 |
Dynamic counters |
| Very short strings (2 chars or less) | ab |
Too generic |
| No vowels (4+ chars) | xyzq |
Likely auto-generated |
When RTILA encounters a class that matches any of these patterns, it skips it and uses other attributes or the element’s position instead.
Safe Classes
Section titled “Safe Classes”The getSafeClasses function filters an element’s classes to only include stable, meaningful classes:
- Splits the
classNamestring by whitespace. - Filters out classes that match
isDynamic()patterns. - Filters out classes starting with known framework prefixes:
css-(CSS-in-JS libraries)sc-(styled-components)tw-(Tailwind CSS)r-(React)Mui(Material UI)
- Filters out classes shorter than 3 characters.
- Returns the remaining “safe” classes.
These safe classes are used in the generated CSS selector to ensure stability across page reloads and site updates.
Stable Attributes
Section titled “Stable Attributes”The getStableAttributeSelector function checks for highly stable attributes before falling back to classes or position:
Priority Order
Section titled “Priority Order”| Priority | Attribute | Example |
|---|---|---|
| 1 | data-* attributes |
data-product-id="12345" |
| 2 | aria-label |
aria-label="Add to Cart" |
| 3 | role |
role="button" |
| 4 | name |
name="email" |
| 5 | id (if stable) |
id="main-content" |
| 6 | title |
title="View Details" |
| 7 | alt |
alt="Product Image" |
| 8 | placeholder |
placeholder="Enter email" |
Attribute Value Handling
Section titled “Attribute Value Handling”- Attribute values are escaped for special characters.
- Non-breaking spaces (
\u00A0) are handled by using only the clean portion. - Empty or whitespace-only attributes are skipped.
- Dynamic attribute values (matching
isDynamicpatterns) are skipped.
ID Stability Check
Section titled “ID Stability Check”Element IDs are checked for stability before being used:
- IDs that are pure numbers are skipped (likely dynamic).
- IDs matching UUID patterns are skipped.
- IDs matching random alphanumeric patterns are skipped.
- IDs matching long hex strings are skipped.
- IDs with 4+ consecutive digits are skipped.
If the ID passes all checks, it is used as #escaped-id in the selector.
Complete Selector Example
Section titled “Complete Selector Example”For a product card element, the generated selector might look like:
css=div.product-card[data-product-id="12345"],xpath=//div[@data-product-id="12345"],text="Wireless Headphones"When the engine processes this selector:
- It first tries the CSS selector:
div.product-card[data-product-id="12345"] - If that fails, it tries the XPath:
//div[@data-product-id="12345"] - If that also fails, it tries the text selector:
text="Wireless Headphones"
This multi-strategy approach ensures your selectors remain robust even when websites undergo minor structural changes.