Forum Discussion

avin's avatar
avin
Occasional Contributor
4 years ago
Solved

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.

 

Please help.

Thank  you in advance.

  • 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.

     

8 Replies

  • Hi,

    Can you provide me with more information, what do you want about validating in Containers?

    • sonya_m's avatar
      sonya_m
      SmartBear Alumni (Retired)

      Thank you for willingness to help MadGrb!

      avin Please provide us with more details so the Community could help you figure this out, or post you solution if you managed to find answers on your own🙂

      • avin's avatar
        avin
        Occasional Contributor
        Hi,
        Sorry for the late response.
    • avin's avatar
      avin
      Occasional Contributor
      Hi,

      Thank you for your help.

      I want to Validate the content like the calculation. It contains a summary table grid. I’m nit sure how to get the properties and check if the values are correct.
      • AlexKaras's avatar
        AlexKaras
        Champion Level 3

        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.