Forum Discussion

mfoster711's avatar
mfoster711
Regular Contributor
5 years ago

Mass Update Namemap Properties

Is there some method to mass update the properties of namemap fields?

 

For technical reasons, our development department had to change the ID value associated with tons of fields in our web application. The new ID value is the same as the old but now has "_input" appended to it. For example, NameFirst is now NameFirst_input. We have hundreds of fields mapped using idStr property and I need all of them modified to have "_input" added to the expected property value.

 

Is there any easy solution to this? Any way to write a script to handle this? Is there any way to even get a list of all fields in the namemap that use idStr as one of their identification properties?

 

Here is how the field change:

 

Edit to add:

I just realized the namemap file is basically an XML file. If I write some code to update this raw file will it corrupt it in TestComplete? I might be able to write some code to update the values I need. 

  • No built in "Mass update" feature is available across all NameMappings.  At least, not that I'm aware of.

    you CAN edit the XML file but I'm always a bit leary of doing so.

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor

    No built in "Mass update" feature is available across all NameMappings.  At least, not that I'm aware of.

    you CAN edit the XML file but I'm always a bit leary of doing so.

    • mfoster711's avatar
      mfoster711
      Regular Contributor

      Updating the XML directly worked for me. I wrote some code to read the file as a XML object and modified the properties as needed. I am not sure if this would work for every issue, but worked for me since all I needed to do was add "_input" to the end of some property names.