UiPath-ADPv1 Advanced UI Automation Practice Question
You are building a selector for a button inside a web application. The button's parent container has a stable id, but the button itself has a dynamically generated class and no unique attributes. Which selector configuration strategy is most robust for this element?
⚠ Common exam trap
The trap here is treating the dynamic class as fixable with fuzzy matching, when fuzzy matching only absorbs minor variations in an otherwise stable value.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Use the stable parent id as an anchor and identify the button by its accessible name or inner text, whichever is stable at runtime.
The most robust approach combines a stable anchor with a distinguishing stable attribute. The parent id is stable, so anchoring on it reduces ambiguity, and the button's accessible name or inner text differentiates it from siblings. This avoids dependence on generated classes, positional indexes, or absolute paths, all of which break under routine application changes.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Build the selector using only the button's dynamic class attribute and enable the fuzzy selector to tolerate changes.
Why it's wrong here
Dynamic classes are regenerated on each build or session, so a selector based on them fails unpredictably. Fuzzy matching tolerates small variations in an otherwise stable attribute, not a value that changes entirely between sessions. Relying on the dynamic class as the primary identifier is therefore unreliable regardless of fuzzy settings.
- ✗
Anchor the selector to the stable parent id and add the button's tag name and its position among siblings.
Why it's wrong here
Position among siblings is fragile because adding or reordering elements changes the index. Even with a stable parent, a positional index breaks when the DOM structure changes. The tag name alone does not distinguish the button from other buttons under the same parent, so this configuration is not robust for the scenario.
- ✓
Use the stable parent id as an anchor and identify the button by its accessible name or inner text, whichever is stable at runtime.
Why this is correct
Anchoring on the stable parent id narrows the search scope, and identifying the button by a stable attribute such as its accessible name or inner text distinguishes it from siblings without relying on generated classes. This combination survives class regeneration and minor layout changes, making it the most robust configuration when the parent is stable.
- ✗
Use a full XPath from the document root that references each ancestor's tag name in sequence.
Why it's wrong here
A full absolute XPath breaks whenever any ancestor is inserted, removed, or reordered. It is the most brittle selector form and offers no tolerance for the dynamic changes present in this application. Even though it may work at design time, it will fail as soon as the page structure evolves, making it unsuitable for a production automation.
About these practice questions
Courseiva writes every UiPath-ADPv1 question from scratch — 276 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →
JA
Written and reviewed by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
Last reviewed September 2026 · checked against the official UiPath exam blueprint
This UiPath-ADPv1 practice question is part of Courseiva's free UiPath certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the UiPath-ADPv1 exam.