# Dynamic identity problem

**URL:** <https://forum.katalon.com/t/dynamic-identity-problem/46167>\
**Category:** Web Testing\
**Tags:** katalon-studio\
**Created:** [August 4, 2020, 11:12am UTC](https://forum.katalon.com/t/dynamic-identity-problem/46167 "2020-08-04T11:12:07Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![alt.g2-bodzn7ub](https://avatars.discourse-cdn.com/v4/letter/a/bb73d2/32.png) [@alt.g2-bodzn7ub](https://forum.katalon.com/u/alt.g2-bodzn7ub)\
**Post date:** [August 4, 2020, 11:12am UTC](https://forum.katalon.com/t/dynamic-identity-problem/46167/1 "2020-08-04T11:12:07Z")

</div>

Hello everyone,

I’m new the this tool. So i am beginner.

I’m testing the “democrm” site. But the site is dynamic, the ID changes when reloading. So it fails. How should I proceed?

Below are screenshots of my problem.

1- ID before uploading

 ![image](https://europe1.discourse-cdn.com/katalon/original/2X/d/d8262b7854a76e75e70de789aafb765ae123b7cb.png)

2- ID after loading test  
 ![image](https://europe1.discourse-cdn.com/katalon/original/2X/6/655a6994914df6d0c3f9f4beb05e3db5e0fb5eec.png)

---

<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:** [August 4, 2020, 3:19pm UTC](https://forum.katalon.com/t/dynamic-identity-problem/46167/2 "2020-08-04T15:19:44Z")

</div>

@alt.g2-bodzn7ub If you show some HTML code of the specific element, then we can assist you with finding other attributes that can help locate it. You can use that to locate other elements.

One option though, if only part of the **id** changes, then use the function, **contains** , where the xpath contains the part that is not dynamic. Something like:

//input[contains(@id,‘MainLayoutEdit\_xaf\_fviUserName\_Edit…’)]

---

<div class="post-metadata">

**Author:** ![Timo\_Kuisma1](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/timo_kuisma1/32/16103_2.png) [@Timo\_Kuisma1](https://forum.katalon.com/u/Timo_Kuisma1)\
**Post date:** [August 4, 2020, 3:27pm UTC](https://forum.katalon.com/t/dynamic-identity-problem/46167/3 "2020-08-04T15:27:34Z")

</div>

hello,

you should extract object property values during running time

check this one page

> **[Handling static and dynamic Test Objects](https://docs.katalon.com/katalon-studio/docs/handling_static_dynamic_test_objects.html#create-a-method-which-returns-a-dynamic-test-object)**
>
> Test Objects are one of the vital parts of building an automation project. This tutorial shows the approaches for handling different types of test objects.

---

<div class="post-metadata">

**Author:** ![alt.g2-bodzn7ub](https://avatars.discourse-cdn.com/v4/letter/a/bb73d2/32.png) [@alt.g2-bodzn7ub](https://forum.katalon.com/u/alt.g2-bodzn7ub)\
**Post date:** [August 5, 2020, 11:37am UTC](https://forum.katalon.com/t/dynamic-identity-problem/46167/4 "2020-08-05T11:37:49Z")

</div>

yeah thx.  
I have reviewed before, it didn’t exactly solve my problem. Thanks again 🙂 🙏

---

<div class="post-metadata">

**Author:** ![Russ\_Thomas](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/russ_thomas/32/11884_2.png) [@Russ\_Thomas](https://forum.katalon.com/u/Russ_Thomas)\
**Post date:** [August 5, 2020, 3:36pm UTC](https://forum.katalon.com/t/dynamic-identity-problem/46167/5 "2020-08-05T15:36:40Z")

</div>

There are many ways to detect an element of interest. The `id` is ideal but, as you have discovered, if it is dynamic (different each time the page is rendered) then it is essentially useless.

People have asked to see your code - please follow this advice:

> [@\[TIP\] How To Help Us Help You!](http://forum.katalon.com/t/tip-how-to-help-us-help-you-my-test-is-broken-nothing-works-updated-nov-2019/12919):
>
> My test is BROKEN! NOTHING WORKS! HELP ME! Relax. We get it. We really do. There are some pretty smart and clever people on this forum, but you must realize, they are not magicians or wizards or gods. They cannot see your code, they can’t see your errors and they don’t even know what your AUT is meant to do even though it might seem perfectly obvious to you. So please relax and follow the advice below, before you start writing your post. The advice below will tell you the exact information …
