# I want to know a good way to reuse test object in multiple test cases

**URL:** <https://forum.katalon.com/t/i-want-to-know-a-good-way-to-reuse-test-object-in-multiple-test-cases/13923>\
**Category:** Miscellaneous\
**Created:** [October 25, 2018, 9:26am UTC](https://forum.katalon.com/t/i-want-to-know-a-good-way-to-reuse-test-object-in-multiple-test-cases/13923 "2018-10-25T09:26:20Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yuki\_Oda](https://avatars.discourse-cdn.com/v4/letter/y/aca169/32.png) [@Yuki\_Oda](https://forum.katalon.com/u/Yuki_Oda)\
**Post date:** [October 25, 2018, 9:26am UTC](https://forum.katalon.com/t/i-want-to-know-a-good-way-to-reuse-test-object-in-multiple-test-cases/13923/1 "2018-10-25T09:26:20Z")

</div>

Hi. I’m using Katalon Studio.

I want to use same test object in different test case for maintainability.  
(I have to make over 200 test case and many of them uses same DOM element)

But when I use recording web, new test object is created every time, so i have to rewrite all of them and reassign to existing test object.  
This is so annoying.  
Is there any good way?

---

<div class="post-metadata">

**Author:** ![Mariusz](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/mariusz/32/386_2.png) [@Mariusz](https://forum.katalon.com/u/Mariusz)\
**Post date:** [October 25, 2018, 10:59am UTC](https://forum.katalon.com/t/i-want-to-know-a-good-way-to-reuse-test-object-in-multiple-test-cases/13923/2 "2018-10-25T10:59:01Z")

</div>

Add Object by yourself.  
 ![](https://s3.amazonaws.com/katalon-forum/editor/gw/v57kena3xtan.png "Image: https://s3.amazonaws.com/katalon-forum/editor/gw/v57kena3xtan.png")  
After that simply add that object in your TC.  
For example, here I’ve used xpaths for Button; Add that object in your TC, set name of button (text that is displayed on button) and number of that button on page as variables (regarding of your page; e.g. if you have 3 buttons with the same name, you need to specify number of that element on page).

Recording web is nice for someone that already start web tests. The best way is to write own objects and call them in TCs.

[elements.png](https://s3.amazonaws.com/katalon-forum/editor/gw/v57kena3xtan.png)

---

<div class="post-metadata">

**Author:** ![Yuki\_Oda](https://avatars.discourse-cdn.com/v4/letter/y/aca169/32.png) [@Yuki\_Oda](https://forum.katalon.com/u/Yuki_Oda)\
**Post date:** [October 26, 2018, 11:13am UTC](https://forum.katalon.com/t/i-want-to-know-a-good-way-to-reuse-test-object-in-multiple-test-cases/13923/3 "2018-10-26T11:13:11Z")

</div>

I want to assign the object added by myself to recorded test case automatically.

Is this possible?

---

<div class="post-metadata">

**Author:** ![Mariusz](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/mariusz/32/386_2.png) [@Mariusz](https://forum.katalon.com/u/Mariusz)\
**Post date:** [October 26, 2018, 12:25pm UTC](https://forum.katalon.com/t/i-want-to-know-a-good-way-to-reuse-test-object-in-multiple-test-cases/13923/4 "2018-10-26T12:25:18Z")

</div>

Sure, just add that object in Manual mode. For example Item -\> Click; Object -\> Button(or other name, object that you have created).
