Get the list of all detected objects in a view

Hello everyone,
I’m relatively new to Katalon and I’m using it to test a Desktop app.

So far, I’ve been using the Spy Windows Object tool to detect the objects available in each views of my app. I select them and register them in a specific repository for each view. As some new components may be added in the future, for further testing I wish to create a method that, for a given view, would:

  • list all detected objects
  • compare that list with the objects already registered in the matching object repository
  • return the objects that are detected in the view but not registered in the directory

In that way, this method would help me to know which objects were added. It would also help me to check the integrity of the views by testing if any unregistered object not supposed to be displayed is in the view.

The first step is the one giving me trouble. In other words, I guess I want to automatically extract the list of detected objects provided by the Spy tool.

Do you have any idea on how I could do that ?

Any idea ?

An idea…yeah.

The only way that I can see it happening is that you create a List of items (as Strings either in a database or spreadsheet) that are currently on the application/page. There has to be some static reference of the old screen/page that can be read into the current running TC. Say this list is oldList. Whenever you run, you would have to accumulate a new list for all the items in the Object Repository (the OR is on disk within the project folder so you would need the folder pathway). Then you could compare newList against oldList.

Addendum: Possibly, since the files in the OR folder have a timestamp and you think you could separate out items based on this timestamp, then maybe you would not need the database or spreadsheet of oldList items. Just collect the items (filenames) and anything with a current timestamp is “new”. Just remember the file timestamp is the modified date, not the created date.