Forum Discussion

ackmondual's avatar
ackmondual
Contributor
4 years ago
Solved

Ensure FindChild is being used correctly

I'm testing an Android application using TestComplete 14.

 

I'm trying to see if I can use the FindChild function in the Object Browser, to see if I can reference objects that Object Spy cannot find (even though they're visible on the screen).  No success.

 

I decided to see if I can use the same FindChild function in the same Object Browser, to see if I can reference objects that I know for sure work.  Still no success.

 

For the first 2 parameters of FindChild (PropNamesPropValues), these should correspond to the "ObjectType" and the "ViewID" fields, under the Extended section, when you open that object right?

  • The developers have mentioned that it likely has something to do with the way they implemented that section of the screen (that contains those buttons that can't be picked up).  They should be able to issue a fix for it.  I did want to ensure I've looked into all options on my end.

     

    Thanks for the replies!  If you or anyone else have anything to add, please continue to post!

8 Replies

  • AlexKaras's avatar
    AlexKaras
    Champion Level 3

    Hi,

     

    if I can use the FindChild function in the Object Browser

    .FindChild() method cannot be used in Object Spy and/or Object Browser but in test code/keyword test only.

     

    if I can reference objects that Object Spy cannot find

    If some object is not present in the objects tree in Object Browser then .FindChild() will not be able to find this object either.

     

    Can you provide a screenshot that will demonstrate the object present on mobile screen and absent in the Object Browser's tree?

     

    • ackmondual's avatar
      ackmondual
      Contributor

      if I can reference objects that Object Spy cannot find

      If some object is not present in the objects tree in Object Browser then .FindChild() will not be able to find this object either.

       

      Can you provide a screenshot that will demonstrate the object present on mobile screen and absent in the Object Browser's tree?

       

      Some clarifications to ensure we're talking about the same thing...

      The button is there in the Object Browser tree view (from a previous screen recording run through)

       

      When I use Object Spy to try to highlight that button (by hovering mouse cursor over it), it can't recognize it (the red rectangle cannot get around the button.  Only a large area around it).  The user can still manually tap on that button to activate it, even if TC can't recognize it.

       

      Unfortunately, I am NOT permitted to upload screenshots of the software.