Forum Discussion

Tuerask's avatar
Tuerask
New Contributor
7 years ago

Android: Object spy cannot recognize child objects of the standard android datepicker

Hi

 

Our app recently started using the standard android datepicker (shown below) and I cannot seem to get the object spy to recognize the individuel dates, only the container they are all in. The crosshairs from object spy could not be caught on the screenshot, but it is located over "5" right now, and only catches the entire container.
I talked to my developers who can see the child items with their tools just fine, but testcomplete does not seem to be able to recognize them. I also tried doing a .childcount on the parent to the missing objects and it returned 0.

Because this is 

So questions:

1. Is there any way for me to further try and locate these objects?

2. Since this is a standard android widget it must be either our implementation doing something weird, or a general problem in testcomplete to recognize it. It would be nice to know if the latter is the case, and if so, what the procedure is for making a bug report/getting it fixed.

 

 

 

 

4 Replies

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor

    I'm not familar with android automation directly... but this seems to be a similar kind of date picker as I've seen in other desktop applications.  Generally speaking, in those applications, it's the same deal... the individual dates (5, 10, 31, etc) and controls in the picker aren't necessarily exposed.  However, there are functions and methods associated with the date picker that may be exposed in the object that can be used to operate the picker.  Would be helpful to see an object browser view of your object with all properties and methods exposed.

    • Tuerask's avatar
      Tuerask
      New Contributor

      Thanks for the reply!

       

      Screenshots are below with properties and methods. There are hundreds of methods in the java category, so that is not included in the ss :)

       

       

       

      • tristaanogre's avatar
        tristaanogre
        Esteemed Contributor

        OK... well, based upon the documentation for testComplete, the SimpleMonthView is not an "out of the box" supported class for Android support.  This does not mean you can't work with it, just that many of the "native" objects and such aren't going to be exposed.

         

        As with desktop and web applications, if there is not an object supported directly, you might be able to edit your project's object mapping and add it in.  Go to Tools -> Current Project Properties -> Object Mapping and, based upon the object, you might want to try adding it under the Calendar section... you might be able to, even, simply select the "Derived classes" option beside the Calendar view and see if that works for you as well.

         

        If that doesn't work for you, then those Java properties and methods that you didn't show in the screenshot would be the next place to go in order to be able to work with the object.