locked
UIMap Recorder not differentiating controls on two pages containing the same type of controls.

    Question

  • Thank you in advance for looking at this!  Any help would be greatly appreciated!

    We are automating test cases for our Pivotal application.  We are having a HUGE problem.  All pages under the same module are copies of a single page, which contain the same set of controls and have the same Window Title. 

    For example:  I have a page for creating a new meeting, and another page for creating a new To-Do item.  Both pages have all the same controls. 

    When I record a test for both pages, the UIMap shows all controls for both pages are under 1 page.  I could work with this if there were two sets of all the controls.  But, that's not the case.  When the tests for the 2nd page is created, the UIMap added all but 2 controls from the 2nd page.  When I put  the crosshair on the 2 controls that were left out, and then looked at the UI Control Map screen, the control on the "first" page is highlighted.  It seems that the recorder doesn't know the difference between the two controls.


    laurie l clos

    • Déplacé niveditabawa_MSFTMicrosoft employee mercredi 14 mars 2012 04:19 moving this to a more appropriate forum. Thanks (From:Testing with Visual Studio Test Manager (MTM))
    jeudi 8 mars 2012 20:02

Toutes les réponses

  • Hi,

    I noticed you mentioned IE Windows Title, so I think you may be using IE 8 or earlier. In IE9 there's no Window Title at all.  Before this posting, I have tested the scenario,

    • Two web pages has same textbox control;
    • Use CodedUI test builder to record test

    It appears to me the textbox control on two pages are recorded very well. Because the parent Window is different. Would you try upgrade your IE to version 9 and retry?

    Best Regards,


    Forrest Guo | MSDN Community Support | Feedback to us

    dimanche 11 mars 2012 15:24
  • we are using IE9....


    laurie l clos

    lundi 12 mars 2012 02:19
  • Got it.  As I didn't reproduce the problem as you said, I think there must be environment and steps difference between the two sides.  Would you clarify:

    1. Did you patch VS 2010 SP1?  SP1 contains rolling updates which fixed lot of issues.
    2. Do you get the two web pages with exact same title shows in IE tab?  You mentioned two pages has same set of control and same Window Title, do you mean the title show in IE tab?
    3. The thread title mentioned UIMap recorder, I suppose you meant the CodedUI Test Builder, please let me know if I misunderstood.  That way I will move the thread to CodedUI test forum and continue to support.

    Please if you can provide exact steps, I'd like to reproduce the issue on my side. This way I can determine if we have workaround for it.

    Best Regards,


    Forrest Guo | MSDN Community Support | Feedback to us

    lundi 12 mars 2012 03:03
  • Answers:

    1.  Yes, I have SP1

    2.  No, I mean all pages under the same module in the app I am working on are copies of a single page, which contain the same set of controls and have the same Window Title.

    3.  No, I'm not talking about a coded UI test.  I am talking about creating a UIMap with the builder.  I does not differentiate the pages.


    laurie l clos

    lundi 12 mars 2012 12:50
  • This is the tree of the UIMap.  As you can see all the controls are under the same Node.  They should be under different nodes since they are on different pages.


    laurie l clos

    lundi 12 mars 2012 13:26
  • Hi Laurie,

    I'll try to get other people involved on this question. Please wait some time.

    -


    Forrest Guo | MSDN Community Support | Feedback to us

    lundi 12 mars 2012 13:36
  • Please makes sure that each page has different title window so the Coded UI can differentiate between them
    For more info please see:

    How does “Coded UI test” find a control??
    http://blogs.msdn.com/b/balagans/archive/2009/12/28/9941582.aspx

    In order to find the control in test execution phase, Coded UI test captures some set of properties on the control and name them as “Search Properties” and “Filter Properties”. Each instance of these is a Name-value pair, with Name being the Property-Name and Value being the actual value of the property during the time of the capture.
    For the following blog please see the following


    Customize Search Properties
    http://blogs.msdn.com/b/gautamg/archive/2009/12/21/understanding-the-code-generated-by-coded-ui-test-part-2.aspx


    Trevor Hancock (Microsoft)
    Please remember to "Mark As Answer" the replies that help.

    mardi 13 mars 2012 20:14
  • Unfortunately we are not able name the windows.  The requirements of the software is that the titles are the same at the outer (window) level and labeled differently in a panel.


    laurie l clos

    mercredi 14 mars 2012 02:08
  • If you are not able to name the windows please use the following blog for guidance  how to Customize Search Properties
    http://blogs.msdn.com/b/gautamg/archive/2009/12/21/understanding-the-code-generated-by-coded-ui-test-part-2.aspx

    Make sure that each window has unique search properties values.


    Trevor Hancock (Microsoft)
    Please remember to "Mark As Answer" the replies that help.

    mercredi 14 mars 2012 19:08