# Can you find an object, then search the child objects for your desired object?

**URL:** <https://forum.katalon.com/t/can-you-find-an-object-then-search-the-child-objects-for-your-desired-object/6165>\
**Category:** Web Testing\
**Tags:** katalon-studio\
**Created:** [July 31, 2017, 7:39pm UTC](https://forum.katalon.com/t/can-you-find-an-object-then-search-the-child-objects-for-your-desired-object/6165 "2017-07-31T19:39:48Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mark\_Peterson](https://avatars.discourse-cdn.com/v4/letter/m/b9bd4f/32.png) [@Mark\_Peterson](https://forum.katalon.com/u/Mark_Peterson)\
**Post date:** [July 31, 2017, 7:39pm UTC](https://forum.katalon.com/t/can-you-find-an-object-then-search-the-child-objects-for-your-desired-object/6165/1 "2017-07-31T19:39:48Z")

</div>

I can use code like :

TestObject to = new TestObject(‘Obj’)  
to.addProperty(“id”, ConditionType.EQUALS, ‘sched.cats\_header’)  
ArrayList\<WebElement\> wes = WebUiCommonHelper.findWebElements(to , 30)

and have an array of elements to look through.

But I want to find a Parent element( such as a table ) then search through the children looking for a specific item…( my tested product has extensive dynamic ‘id’ naming preventing direct addressing ) so narrowing my search.

So I am seeking a method to find an object ( such as a frame with a text property ) then pass the result to a secondary search to find a specific object within the frame such as a “tableview” .

When I examine the result set in the array ‘wes’ the objects found do not seem to have properties other that what was used to find them. I have tried using regex filtering but again the found object does not seem to have properties other than what was used to find it.

Thoughts?

---

<div class="post-metadata">

**Author:** ![Lyndon\_Grunewald](https://avatars.discourse-cdn.com/v4/letter/l/49beb7/32.png) [@Lyndon\_Grunewald](https://forum.katalon.com/u/Lyndon_Grunewald)\
**Post date:** [December 12, 2017, 9:36pm UTC](https://forum.katalon.com/t/can-you-find-an-object-then-search-the-child-objects-for-your-desired-object/6165/2 "2017-12-12T21:36:21Z")

</div>

Any luck in your search? I too have a similar inquiry where I am creating table values, searching for the text (as the id #'s change with each entry) and then wanting Katalon to stay in the table column and click the “Delete” checkbox. Whenever I try it, it searches the text but then finds the first checkbox on the page, rather than staying in the column the text is contained in. I am trying to find some command that has to do with the child relationship between the found text and the checkbox. Thanks!

---

<div class="post-metadata">

**Author:** ![Lyndon\_Grunewald](https://avatars.discourse-cdn.com/v4/letter/l/49beb7/32.png) [@Lyndon\_Grunewald](https://forum.katalon.com/u/Lyndon_Grunewald)\
**Post date:** [December 12, 2017, 11:06pm UTC](https://forum.katalon.com/t/can-you-find-an-object-then-search-the-child-objects-for-your-desired-object/6165/3 "2017-12-12T23:06:44Z")

</div>

Sorry, I meant table row not column. The Delete checkbox is in the 1st column and the text I’m searching for is in the 3rd column. Anyway, any help would be appreciated.

---

<div class="post-metadata">

**Author:** ![Declan\_Murphy](https://avatars.discourse-cdn.com/v4/letter/d/cdc98d/32.png) [@Declan\_Murphy](https://forum.katalon.com/u/Declan_Murphy)\
**Post date:** [January 11, 2018, 11:32am UTC](https://forum.katalon.com/t/can-you-find-an-object-then-search-the-child-objects-for-your-desired-object/6165/4 "2018-01-11T11:32:34Z")

</div>

I have a similar issue. I have a child object and I want to get the parent object of it?

---

<div class="post-metadata">

**Author:** ![Declan\_Murphy](https://avatars.discourse-cdn.com/v4/letter/d/cdc98d/32.png) [@Declan\_Murphy](https://forum.katalon.com/u/Declan_Murphy)\
**Post date:** [January 11, 2018, 12:05pm UTC](https://forum.katalon.com/t/can-you-find-an-object-then-search-the-child-objects-for-your-desired-object/6165/5 "2018-01-11T12:05:08Z")

</div>

> @Declan Murphy said:  
> I have a similar issue. I have a child object and I want to get the parent object of it?

[https://api-docs.katalon.com/studio/v4.8.0/api/com/kms/katalon/core/testobject/TestObject.html](https://api-docs.katalon.com/studio/v4.8.0/api/com/kms/katalon/core/testobject/TestObject.html)

---

<div class="post-metadata">

**Author:** ![Declan\_Murphy](https://avatars.discourse-cdn.com/v4/letter/d/cdc98d/32.png) [@Declan\_Murphy](https://forum.katalon.com/u/Declan_Murphy)\
**Post date:** [January 11, 2018, 12:05pm UTC](https://forum.katalon.com/t/can-you-find-an-object-then-search-the-child-objects-for-your-desired-object/6165/6 "2018-01-11T12:05:29Z")

</div>

Why can’t I make my own threads by the way?

---

<div class="post-metadata">

**Author:** ![bradley.latreille](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/bradley.latreille/32/8005_2.png) [@bradley.latreille](https://forum.katalon.com/u/bradley.latreille)\
**Post date:** [November 19, 2019, 3:58pm UTC](https://forum.katalon.com/t/can-you-find-an-object-then-search-the-child-objects-for-your-desired-object/6165/7 "2019-11-19T15:58:55Z")

</div>

A solution for this problem (The issue where the id’s are constantly changing, not the searching of child elements) … Just create your own element attributes… example:  
`
< a href=’’ id=’’ my-own-attribute=’’ />
`  
Put your katalon test ids inside of the **my-own-attribute** attribute value to save the id and class attributes for the developers and also to make sure you have full control over these as a tester. (Meaning it shouldn’t be changed or have dynamic values without your knowledge)

However keep in mind you may utilize the Custom Keywords to create any type of sorting/searchign functions you require. Take a look at the follow post which should start you off in the right path for searching tables.

> **[How to handle Web Tables](https://docs.katalon.com/katalon-studio/docs/handle_web_tables.html)**
>
> A Web table is a collection of rows and columns. This article will show you how to handle web tables using Katalon Studio.

---

<div class="post-metadata">

**Author:** ![albert.vu](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/albert.vu/32/20595_2.png) [@albert.vu](https://forum.katalon.com/u/albert.vu)\
**Post date:** [August 8, 2022, 7:39am UTC](https://forum.katalon.com/t/can-you-find-an-object-then-search-the-child-objects-for-your-desired-object/6165/8 "2022-08-08T07:39:24Z")

</div>

Archived on August 8, 2022, 7:39am UTC


