Every statement that touches the screen needs a way to find its element again at execution time. For web elements, ACCELQ gives you two identification approaches, and choosing between them is one of the few real decisions in web recording. This article explains both, how to set your project's default, and how ACCELQ helps you pick the right one per element.
Everything here also applies to the PDF and Electron Recorders, which support the same two strategies.
Locator-Free: Identification with Nothing to Maintain
With Locator-Free, ACCELQ's AI detects the functionally significant label for the element, and that hint becomes part of the statement itself:
Here "Username" is the AI-detected label. There is no locator to create, no element to save, and nothing in the Element Repository to manage; the identification lives in the statement. Because it is based on what the screen means to a user rather than how the page is coded, your logic stays functional through changes to the application's DOM structure and HTML, with no dependency on front-end code specifics.
Things to know:
- Hints are not always visible text. The detected hint may reference labels not displayed on screen. Hover over the element in the recorder for a moment to see the hint ACCELQ will use.
- Statements are prefilled. When recording, the hint is filled into the generated statement automatically.
- No Element Instances. Since there is no repository entry, Locator-Free elements cannot carry breakpoint or platform instances. Use Smart Locator where instances are needed.
Smart Locator: Managed, Attribute-Based Identification
With Smart Locator, the element is saved to the Element Repository under a logical name, and your statement refers to it by that name:
ACCELQ generates a unique identifier from a stable combination of the element's HTML attributes. Although this depends on the page structure, the intelligent selection of stable attributes keeps identification reliable across application updates, and Self-Healing during execution can recover when a primary locator fails.
Smart Locator brings the benefits of central management: elements can be reviewed and reconciled in the repository after UI changes, shared across all Actions in the Context, and extended with Element Instances for breakpoint-specific identification (see Device Emulation and Breakpoints).
A View of the page is captured automatically when a Smart Locator element is saved, supporting identification and offline work. See Views, Elements, and Identification.
Setting the Project Default
The default strategy for new statements is set in Resources > Project Preferences. By default, ACCELQ uses Locator-Free whenever possible. The preference applies whenever statements are generated, whether from the recorder or typed in the Logic Editor.
When ACCELQ Decides for You
Two behaviors override the preference, both in the interest of reliable identification:
- Automatic fallback. If Locator-Free cannot produce a meaningful, reliable hint for an element, ACCELQ uses Smart Locator for that element automatically, regardless of the preference.
-
Review prompt. If a hint is produced but ACCELQ assesses that its label clarity deserves your judgment, it presents you the choice between Locator-Free and Smart Locator for that element, again independent of the preference. Pick whichever identification you trust more for that field.
Choosing Per Element
You can override the strategy for any individual step, regardless of the project default:
- The [L/O] tag. In the recorder's right-click menu, an [L/O] tag appears beside each command. Click it to toggle between Locator-Free and Smart Locator before selecting the command. The same tag appears in the Logic Editor's command search results when you type statements by hand, so the override is available in both authoring styles.
-
The ELEMENT popover. Clicking the ELEMENT button in the right-click menu header shows both approaches side by side for the hovered element: the Locator-Free section with the detected label (and a note that no saving is needed), and the Smart Locator section with a preview of the selector plus Save to Repo and Save As links. Use it to compare the two identifications at a glance before committing, or to save the element under your own name. Save As replaces an existing element, which is how you reconcile after UI changes or create breakpoint-specific Element Instances.
Which One, When
| Prefer Locator-Free when... | Prefer Smart Locator when... |
|---|---|
| The application has clear, descriptive labels | Labels are missing, ambiguous, or duplicated |
| UI text is relatively stable | The UI is complex or highly dynamic |
| You want zero element-management overhead | You want central management and reconciliation |
| You need Element Instances for breakpoints |
Most projects use both: Locator-Free as the low-friction default, Smart Locator where structure or instances demand it. The fallback and review behaviors above mean you get a workable identification either way, with your judgment requested only where it adds value.
For deeper guidance, see Best Practices for utilizing Locator-Free Elements and Troubleshooting issues with Locator-free element identification.
Comments
0 comments
Please sign in to leave a comment.