Forum Discussion

sborno's avatar
sborno
Occasional Contributor
10 days ago

How to make objects visible in the object tree?

Hi,

We are analysing a wpf application and like to select the object in the object tree, which has the property 'background' set to #778899.

Our controls on level 0-2 ('L0_Control.jpg, L1_Control.jpg, L2_Control.jpg') have the property 'Background' not set. All child controls >= Level 3 have no background property set, too ('ContentControl' could not be expanded).

How could objects be made visible, which are currently not in the object tree?

Thanks in advance!

  • Is there any chance that the color for those elements is coming from a Style rather than background?  Your software engineers can probably identify if the color is coming from a style.

    With WPF there are so many levels in the hierarchy I sometimes have trouble finding the right one.  If Background shows "(Null Object)" the two most likely reasons in my opinion are either the background color is coming from something else (e.g. a Style) or you need to select something at a higher or lower level.  I hate WPF...

    Sorry I don't have a more definitive answer.  This is a tough one.

    Best regards,
    John

    • rraghvani's avatar
      rraghvani
      Champion Level 3

      Most likely, they are using Custom Styling in their application. Hence the Background is appearing as Null Object in Object Spy.

       

  • rraghvani's avatar
    rraghvani
    Champion Level 3

    The property value i.e. Background, is not being exposed by your application. Hence, this is not being shown in the Object Spy tool.

    To expose the property values, speak to your application developers.

    • sborno's avatar
      sborno
      Occasional Contributor

      Hi, rraghvani

      Thanks for your response!

      The question is not if the property 'Background' is shown - the question is more how to make the object visible in Testcomplete (and the object tree)?

      The tool 'Snoop' could show the current state of the 'Background' (and the corresponding object) without any problems (see 'Snoop_shows_state_background_property.jpg') - so there is no need to speak to the application developers.

      Furthermore Testcomplete could show states of public and private .net properties. - So how could I find the correct object, which shows this property?

      Kind regards