Ask a Question

TestComplete dynamic objects

SOLVED
thaidy
Occasional Contributor

TestComplete dynamic objects

Hello, 

 

I have started to use TestComplete a couple of weeks and I am developing tests to check if everything is okay in my device/application. My question is how I can check and count dynamic objects. Here is a concrete case, I have this series of Modules, each line is a different module. What I need to do is check if the health of the module is "OK". If the number of modules were always the same, it would be easy to check, but an external admin can add new modules under , for example "SysLog", or remove. In other words, if I record a test for 8 modules and an admin remove one, my test will give me error because I only checked 7 and the software will not find the 8th module, so I need a method that reads me the exact number of modules, for example, if I have 1 module I run the test for 1 module, if I have 6, run for 6. This is possible?

 

thi.PNG

 

Thank you very much 😃

2 REPLIES 2
Marsha_R
Community Hero

Rather than looking for a specific number of rows, you can look for the end of file condition on the table. 


Marsha_R
[Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
AlexKaras
Community Hero

Hi,

 

Without having any idea about your tested application:

-- Screenshot presents something that looks like a table;

-- You need to investigate this table in the Object Browser and figure out how to identify it (i.e. what set of stable and unique identifiers it provides that can be used as a parameters for one of the FindXXX methods);

-- Then you need to do the same for rows and columns (i.e. how to stably and reliably identify entities that look like rows and columns - depending on your tested application they may be implemented in a lot of different ways);

-- After the above is done, the easy part is left: search for all rows for this table, iterate through the found list and check the value for the cell of the Health column.

 

Regards,
  /Alex [Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
================================
cancel
Showing results for 
Search instead for 
Did you mean: