# Issue with id changes

**URL:** <https://forum.katalon.com/t/issue-with-id-changes/60331>\
**Category:** Web Testing\
**Tags:** katalon-studio\
**Created:** [November 24, 2021, 4:20pm UTC](https://forum.katalon.com/t/issue-with-id-changes/60331 "2021-11-24T16:20:30Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![ferrariklersone](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/ferrariklersone/32/15706_2.png) [@ferrariklersone](https://forum.katalon.com/u/ferrariklersone)\
**Post date:** [November 24, 2021, 4:20pm UTC](https://forum.katalon.com/t/issue-with-id-changes/60331/1 "2021-11-24T16:20:30Z")

</div>

I have a problem with each deployment of the application, the ids change, this creates the regressions in the test script.  
it wastes my time inspecting and then, looking for the new xpath or id each time for the test to be passed.

How can I avoid this so that my test still during the deployment of the application?

---

<div class="post-metadata">

**Author:** ![grylion54](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/grylion54/32/16265_2.png) [@grylion54](https://forum.katalon.com/u/grylion54)\
**Post date:** [November 24, 2021, 6:14pm UTC](https://forum.katalon.com/t/issue-with-id-changes/60331/2 "2021-11-24T18:14:36Z")

</div>

Can you give us an example showing the HTML of one of your elements that needs a new xpath? That way, we can evaluate another method for you.

---

<div class="post-metadata">

**Author:** ![ferrariklersone](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/ferrariklersone/32/15706_2.png) [@ferrariklersone](https://forum.katalon.com/u/ferrariklersone)\
**Post date:** [November 25, 2021, 8:57am UTC](https://forum.katalon.com/t/issue-with-id-changes/60331/3 "2021-11-25T08:57:24Z")

</div>

such as this text field, before deployment, the input went very well  
but after now, all the text fields, changed id.  
so the test fails.

e.g :

 ![image](https://europe1.discourse-cdn.com/katalon/original/3X/5/7/577c5c91226abb00518c33fd61e2db262d5785ac.png)

thank you for helping Dear @grylion54

---

<div class="post-metadata">

**Author:** ![grylion54](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/grylion54/32/16265_2.png) [@grylion54](https://forum.katalon.com/u/grylion54)\
**Post date:** [November 25, 2021, 4:06pm UTC](https://forum.katalon.com/t/issue-with-id-changes/60331/4 "2021-11-25T16:06:02Z")

</div>

You say changed “id” but since I don’t see the “id” tag, do you mean changed “name” or changed their identification pathway? If you launch the web page again, does the “name” identification for the \*\*Bank Reference" element change? Or, do you believe the “name” identification will change when you get another release?

Edit: Oh, I see on another forum question that you have an “id” tag out of view above what you show us here. I will check back after to see what you get as an answer from them.

> [@Objects is no longer clickable](http://forum.katalon.com/t/objects-is-no-longer-clickable/59218/18):
>
> such as this text field, now unable to fill that after deployment of the App. The id changed, test fails now. @Brandon_Hein thank you ! [image]

---

<div class="post-metadata">

**Author:** ![ferrariklersone](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/ferrariklersone/32/15706_2.png) [@ferrariklersone](https://forum.katalon.com/u/ferrariklersone)\
**Post date:** [November 25, 2021, 4:51pm UTC](https://forum.katalon.com/t/issue-with-id-changes/60331/5 "2021-11-25T16:51:19Z")

</div>

So it not changes, but does not work after deployment.  
it seems like id, xpath what i used are not stable.

I don’t know!

---

<div class="post-metadata">

**Author:** ![grylion54](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/grylion54/32/16265_2.png) [@grylion54](https://forum.katalon.com/u/grylion54)\
**Post date:** [November 25, 2021, 4:53pm UTC](https://forum.katalon.com/t/issue-with-id-changes/60331/6 "2021-11-25T16:53:10Z")

</div>

See if this format is more “stable” than the style you have (it is only valid for **id** attributes):  
What you have:  
`//div[@id='bank_reference']/div/input`

My suggestion:  
`id('bank_reference')/div[1]/input`

Do you know if the **name** tag is dynamic or static? If it is static, perhaps we could use that?  
`//input[@name='j_idt319']`

---

<div class="post-metadata">

**Author:** ![ferrariklersone](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/ferrariklersone/32/15706_2.png) [@ferrariklersone](https://forum.katalon.com/u/ferrariklersone)\
**Post date:** [November 29, 2021, 2:27pm UTC](https://forum.katalon.com/t/issue-with-id-changes/60331/7 "2021-11-29T14:27:10Z")

</div>

The tag is dynamic, that why id changes in each deployment.

So when the tag is dynamic, how can i solve the issue due to click? if you got an idea.

Thank you very much Dear @grylion54 for your help.
