Testing / Ranorex Interview questions
What is the difference between weak and strong (absolute) references in RanoreXPath?
Both describe how precisely a RanoreXPath pins down an element's location, and the difference matters most when the surrounding UI structure changes over time.
| Weak reference | Strong / absolute reference |
| Uses a minimal set of stable attributes needed to identify the element uniquely. | Encodes the full, exact path from the root window, often including sibling indexes. |
| Tolerant of unrelated UI changes elsewhere in the tree. | Breaks if any ancestor's structure or order changes, even outside the target element. |
| Default style generated by the Recorder for most elements. | Sometimes necessary when no attribute combination is unique enough on its own. |
// Weak reference - survives most layout changes /form[@title='Orders']//row[@rowindex=$idx]/cell[@text=$product] // Strong/absolute reference - tied to exact structure /form[1]/container[2]/table[1]/row[3]/cell[2]
Because weak references generally survive far more UI churn, Ranorex prefers generating them automatically, and reaching for a strong reference is usually a sign that the app's identifying attributes are genuinely insufficient rather than a first choice.
More Related questions...