Forum Discussion

avin's avatar
avin
Occasional Contributor
5 years ago

Content Container

Hi,   Anyone here who have worked on validating the WinFormsObject("ContentContainer") Object? I need to validate the values in the ContentContainer object. I cannot find the Properties to use.   ...
  • AlexKaras's avatar
    AlexKaras
    5 years ago

    Hi,

     

    It contains a summary table grid. I’m nit sure how to get the properties and check if the values are correct.

    As it was already said by Benoit, Object Browser / Object Spy is the primary tool that should be used to investigate internals of the tested application and to search for the properties / methods that can provide you the information that you need.

    For the web applications, the contentText property of some container control contains all text displayed by this container and all its child controls. Sometimes this helps, sometimes does not.

    For desktop applications, container controls usually do not have a property that contains the content of all child controls. This means that you need to find the needed controls and their relevant properties that contain values that you are looking for. In the case of table, usually you need to iterate through its cells and read cell values one by one.

    .Net applications provide access to some set of native .Net methods through the metadata. These methods can be seen in the Object Browser on the Methods pane of the highlighted object. You may talk with developers and ask them if some method that can provide you with the data displayed by control (table in your case) exists. If such method exists, you may check if it is accessible to TestComplete (this method will be displayed on the Methods pane for this given object) and try to call it from your test code.