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

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?

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!

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.

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

@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

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

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.