# Dynamic XPath

**URL:** <https://community.automationedge.com/t/dynamic-xpath/17537>\
**Category:** Process Studio\
**Tags:** rpa\
**Created:** [February 12, 2026, 9:24am UTC](https://community.automationedge.com/t/dynamic-xpath/17537 "2026-02-12T09:24:29Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![rohanb](https://avatars.discourse-cdn.com/v4/letter/r/5e9695/32.png) [@rohanb](https://community.automationedge.com/u/rohanb)\
**Post date:** [February 12, 2026, 9:24am UTC](https://community.automationedge.com/t/dynamic-xpath/17537/1 "2026-02-12T09:24:29Z")

</div>

How to Create Dynamic XPath for Radio Button Selection?

---

<div class="post-metadata">

**Author:** ![AETrainings](https://avatars.discourse-cdn.com/v4/letter/a/2acd7d/32.png) [@AETrainings](https://community.automationedge.com/u/AETrainings)\
**Post date:** [February 12, 2026, 11:58am UTC](https://community.automationedge.com/t/dynamic-xpath/17537/2 "2026-02-12T11:58:00Z")

</div>

There are two ways:

**1) Using GUI Spy**  
Use GUI Spy to locate the radio button. It helps identify stable attributes (name, value, id, text) and provides the dynamic XPath.

**2) Manually Writing Dynamic XPath**  
Inspect the radio button and create XPath using stable attributes. Common approaches:

- Using attribute:  
`//input[@type='radio' and @value='Option1']`

- Using label text:  
`//label[text()='Option1']/preceding-sibling::input[@type='radio']`

- Using contains():  
`//input[@type='radio' and contains(@value,'Option')]`

**Note: It is recommended to use GUI Recorder or generate the step using GUI Spy for better accuracy and stability.**
