When you use the Transaction Recorder, the recorder returns a long list of possible selectors that the monitor can use to identify a page element. Each step or action only uses one of these selectors. Therefore Uptrends uses an algorithm to determine the best selector.


The Transaction recorder provides the list of possible selectors. The list of selectors contains various text, id, css and xpath selectors. The Transaction Recorder generates the list of all of the possible selectors as you interact with the page elements. The recorder itself does not contain any logic to choose one selector over another, so the Uptrends servers make the determination during the conversion process.

To select the best selectors, Uptrends looks at the value of the selector; e.g., a CSS selector value that looks like "#menu .home". The server looks to choose a selector value and type that is not to vague or too complicated nor appears frequently on the page.

Selection process

The following steps are executed to find the best selector:

  1. Normalization: The normalization process filters out any selectors that have the same value and select on the same attributes.
  2. The removal of unsupported locators: The process  removes any selectors that Self-Service Transactions don't support (text selectors).
  3. Prioritization of the element types: The process gives priority to selectors based on type (in order of priority): text, id, name, CSS, XPath (text), XPath (attributes), XPath (index), XPath (node).
  4. Prioritization of shorter selectors over longer ones: Uptrends prioritizes the selector based on the number of characters in the string giving priority to the shortest selector.
  5. Prioritization of the matched elements count: each selector may have multiple elements on the page that match the same description, so this process gives priority to selectors based on uniqueness.
  6. Prioritization of single match selectors: Uptrends gives the highest priority to selectors that only match one element on the page.
  7. Final selection: The resulting list has the selectors prioritized, and Uptrends chooses the first selector in the list for the action.