Forum Discussion

soda's avatar
soda
Contributor
12 years ago

Multiple NameMapping files?

We have a 32bit version and a 64 bit version of our product.  The difference in the objects were great enough we chose to create two different namemapping files.  We created a 32bit subfolder inside the NameMapping folder thinking that we could move the 32 bit name map up to the NameMapping folder level using a script before launching TC from command line.  It seems that the 32bit namemapping file is being picked up on the 64bit machines?



How does TestComplete search for the namemapping file?  Just reading the directory, or in our case the subdirectory in the order which the nodes appear?  Do we have to actually store a second namemapping file outside of the NameMapping folder?

Thanks,

Mark

2 Replies

  • function NameMappingSample()
    {
      // Specifies the installed version of Internet Explorer
      var ver = Options.IESettings.GetInternetExplorerMajorVersion();
    
      // Sets the name mapping configuration
      if (ver > 7)
        NameMapping.CurrentConfigurationName = "IE8";
      else
        NameMapping.CurrentConfigurationName = "IE6&7";
    
      // Performs testing actions
      …
    
    } 

    Have you thought of using NameMapping Configuration, which can be changed by script at runtime...

     

     

     

    • Ravik's avatar
      Ravik
      Super Contributor

      Agree with rrivest ,

       

      No need to create multiple name mapping, Create multiple configuration and use those.

       

      Set OSInfo = Sys.OSInfo

      If OSInfo.Windows64bit Then

      NameMapping.CurrentConfigurationName = "NM_64Bit"

      Else

      NameMapping.CurrentConfigurationName = "NM_32Bit"

      End If

       

      where NM_64Bit & NM_32Bit are your name mapping configuration