Forum Discussion

wmtan01's avatar
wmtan01
Contributor
4 years ago

Converting an old project to CSS/XPATH

Hi,   It seems most of the updates of TestComplete are geared toward Cross Platform Testing which is great. But my question is how do you convert an old project namemapping to the one that uses CSS...
  • hkim5's avatar
    hkim5
    4 years ago

    the converter is available in 14.72 - the official documentation has not gone up yet

     

    What is it
    A simple conversion utility to help users convert their Namemapping file from proprietary object recognition format to cross-platform object recognition format (XPath and CSS Selectors). This will help users run
    tests created prior to v14.40 on CBT. Our internal tests suggests that ~70% of conversion happens automatically.
    How it works
    There are two phases of conversion:
    Data collection phase - TestComplete needs to analyze information in your Namemapping file and create new mapping criteria during runtime. You will need run your existing project several times so that TestComplete reads and understands as much information as possible.
    Conversion phase- After TestComplete get generates the required files, it applies the new criteria to your existing project
     
    Instructions
    1. Make sure to back up your entire project
    2. Launch TestComplete using a special command line key - -SaveNameMappingData:"<Directory_to_store_namemapping_data>"
    3. Run you test several times so all test cases are executed and all objects are interacted with
    4. Close TestComplete and restart TestComplete without the special command line key
    5. Go to Namemapping panel, right-click to bring up the context menu, and select “Convert Namemapping” 
       
      Select all the files that were generated in the “data collection” phase and click OK
    6. Your objects will now be in the cross-platform format (XPath and CSS Selectors)