How to deal with control name, which changes depending on the used language?

Answered How to deal with control name, which changes depending on the used language?

  • Tuesday, November 02, 2010 4:01 PM
     
     

    Hello,

    Can someone helps me to deal with control name, which changes depending on the used language or the used values. That has been my problem.
    For example: Adding the control name of a text box to the UIMap when the text box is still empty goes with the original control name.

    Thanks


    sdpanong

All Replies

  • Wednesday, November 03, 2010 5:05 AM
     
     Proposed

    The way to work across localized bits is to ensure that there is a constant ID for each of the controls that you are dealing with.  That way you will not face any issues when the product is localized

    Thanks

    Rituparna


    http://blogs.msdn.com/rituparna
    • Proposed As Answer by Rituparna MSFT Wednesday, November 03, 2010 5:05 AM
    •  
  • Wednesday, November 03, 2010 12:00 PM
     
     

    Hi,

    I have done that for couple of sites by removing the Window Title or removing another property that changed when switching languages.

    Configure search properties used by recorder\code generation

    Even if the Control Name is changed you can try find something unique for that control.

    THanks


    Please mark the replies as answers if they help and unmark them if they provide no help.
    My blog: blogs.microsoft.co.il/blogs/shair

    Shai Raiten

  • Friday, November 05, 2010 8:09 AM
     
     

    Hi,

    Can someone help me with more details on how to use the RemoveUnwantedProperties.zip . I intend to remove the property name from the search criteria and add the automationid to it.

    Thanks,


     


    sdpanong
  • Friday, November 05, 2010 8:19 AM
     
     

    Hi,

    automationid should be added with any need of extension, did you copy the binary to - C:\Program Files (x86)\Common Files\microsoft shared\VSTT\10.0\UITestExtensionPackages?

     

    Thanks


    Please mark the replies as answers if they help and unmark them if they provide no help.
    My blog: blogs.microsoft.co.il/blogs/shair

    Shai Raiten

  • Friday, November 05, 2010 9:45 AM
     
     

    Hi,

    I did and I also added

    • Microsoft.VisualStudio.TestTools.UITest.Common.dll
    • Microsoft.VisualStudio.TestTools.UITest.Extension.dll as reference

    Please could you give me the next steps that will be help me achieve what I need.

     

    I appreciate your help

     

     


    sdpanong
  • Monday, November 08, 2010 9:11 AM
     
     

    Hi,

    When I start coded UI Test Builder, in the search section I have the following parameters:

    • ControlType
    • TechnologyName
    • Name

    In my setting the name is always used to generate the UI control. Because this name changes from the one language to the other, I wish to use a unique identification such as AutomationId or ControlName. After getting the extension package RemoveUnwantedProperties.zip . installed as described, no change occurred. It can also be possible that I missed a track.

    Can someone just help me out?

    Thanks,

     


    sdpanong
  • Monday, November 08, 2010 8:12 PM
    Owner
     
     Answered

    Hi,

    Please make sure that the steps mentioned in CopyDrop.bat are executed properly.

    Also, as mentioned in the post, these steps will only remove “Name” property from the search criteria, you need to customize the code as per your need.

    Did you regenerate the code after copying the dlls to 'UITestExtensionPackages' folder?

    Thanks

  • Tuesday, November 09, 2010 12:26 PM
     
     

    Hi,

    It seems to be working only for some of my control. We are using infragistic technologie in all our forms and I wish to know if this technologie is already supported. As of last year it was not.

    I wish to use AutomationId in my search criteria but I don´t know how to get it appear as one of the available properties. Should I do something specila to get it appear.

    Thanks,


    sdpanong