Forum Discussion

chicks's avatar
chicks
Regular Contributor
14 years ago

automated testing with Google Maps API

Our new website will be heavily location based and use the Google Maps API  quite a bit.



Is it possible / practical to do any automation of this API using TestComplete?



Thanks,



Curt Hicks

9 Replies

  • chicks's avatar
    chicks
    Regular Contributor
    Thank you David.  I have briefly reviewed the Region Checkpoint information.   As I understand it, this will let me compare images with previously captured images.   I am thinking that this pretty much limits me to a 'catch and replay' situation.  That is, I'll be able to check that icons on the map show up the same way they were last time. Ideally, I'd like to be able to  identify what icons and which icons have been dropped, and access the icons at least to click on them .   I've attached a screen shot.


  • VLapidus's avatar
    VLapidus
    Frequent Contributor
    Have you tried adding WndClass of the window to List of accepted windows in the MSAA options? Or UI Automation?

  • Hello Curt,





    These maps are represented as individual image objects, the path is also a set of several small images (you can check this in the Object Browser). So, the best variant is to use Allen's suggestions in the mentioned thread. You can capture images during the playback and compare them by using, for example, the Regions.Compare method. As you can see from the Parameters section, images are not necessarily previously captured ones.


  • chicks's avatar
    chicks
    Regular Contributor
    Ncoes:  Thanks for your response.  Can you give me a bit more detail about your suggestions please?  I'm not sure I understand them.



    Thank you,  Curt
  • chicks's avatar
    chicks
    Regular Contributor
    Allen,



    I don't understand the part of your comment about "the path is also a set of several small images (you can check this in the Object Browser)"

    When I initially tried to use the object browser to point to one of the icons on the map, it outlines a panel area that may or may not even contain the icon I pointed to.  There is a grid left to right top to bottom of 12 of these "sub-panels".  I'm guessing that the google map image is either reserving these panels for popups OR since the map can be shifted, that the panels correspond to different areas of the map that can be displayed.

    Not that I can highlight some of them and the map may shift or the highlighted object might be completely off the map display area.



    Does any one know what these panels correspond to?   I've attached a snapshot of the heirarchy.



    It looks like I will have to take image checkpoints of the map as expected and use the Regions.Compare to see if what I am getting matches.

    Comments?  



    The get an image of the difference sounded promising.  I was hoping I could do an automatic comparison of the image but it sounds like that might be a manual process.  Is that right?   In other words, I take a  picture "X".  I compare it with a picture  "X" + "Y", then automatically compare the difference image with my image of "Y".  Is that possible?



    I suppose I will have to   estimate the icon locations if I want to do any clicking on them .   Comments?



    Thanks very much.

    Regards,  Curt Hicks
  • chicks's avatar
    chicks
    Regular Contributor
    Whoops.  Here's the snapshot of the object heirarchy when I try to highlight a particular icon on the map.
  • VLapidus's avatar
    VLapidus
    Frequent Contributor
    Hi Curt,



    Can you give me a bit more detail about your suggestions please?


    Nevermind, they do not help.



    Does any one know what these panels correspond to?


    This is the internal structure of Google Maps.



    It looks like I will have to take image checkpoints of the map as expected and use the Regions.Compare to see if what I am getting matches.

    Comments?


    Correct.



    I was hoping I could do an automatic comparison of the image but it sounds like that might be a manual process.  Is that right?


    Not exactly. It can be automatic if you specify the array of images somehow and then compare the needed elements in this array.



    I take a  picture "X".  I compare it with a picture  "X" + "Y", then automatically compare the difference image with my image of "Y".  Is that possible?


    Yes, refer to the Picture.Difference help topic.



    I suppose I will have to   estimate the icon locations if I want to do any clicking on them .   Comments?


    Correct.