Ask a Question

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

Tuerask
New Contributor

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.

 

 

 

 

datepicker.png

4 REPLIES 4
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.


Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available

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 🙂

 

properties.png

 

 

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.


Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available

Thank you for the reply. I did not know about object mapping, and it was valuable information to read about. Unfortunately it did not solve the problem. Adding SimpleMonthView seems to crash the app when i try to use object spy on the object. 

I do know more now, which will help me troubleshoot with my developers and see if we can figure out a solution, so thank you! I will try and delve into the java methods and see if i can get access to the child objects through there.

cancel
Showing results for 
Search instead for 
Did you mean: