Forum Discussion

sdruker's avatar
sdruker
Contributor
11 years ago

Changing NameMapping hierarchy

Hi,



I recorded a keyword test, and during the recording, Testcomplete  has created new page object and  mapped new the objects under this page .



I already have suitable page with the same properties in my NameMapping tree, and

I want to rename the new objects names and put them under the existing tree,

but then the objects will not correspond to the objects in the test and it will destroy my tests.



Is there a way to update all the objects inside my tests after such a change?

maybe something like find and replace?



Thanks,

Silvana



4 Replies

  • TanyaYatskovska's avatar
    TanyaYatskovska
    SmartBear Alumni (Retired)
    Hi Sivan,

     


    You can drag and drop elements from one place to another in the Mapped tree. 


    Also, you will need to modify the mapped criteria in the parent object that will be common for all child objects.


     


    The "Changing Mapped Objects' Hierarchy" article contains more information.


     

  • Thank You Tanya.



    I read the suggested article .

    in the article's notes it's written that:



    "When you change the object hierarchy in Name Mapping, this also changes the fully-qualified syntax for addressing the corresponding objects in your tests (you can view this syntax in the top right of the Name Mapping Editor). Therefore, you also need to update your tests to use the new syntax of mapped names and aliases, otherwise the tests will fail with the “Object not found” or similar errors."





    I undestand that if I change the Name Mapping object hierarchy I also need to update my tests to the new syntax.

    My question is , if there is a simple way to find and replace all the Instances of the object in my test in order to change them all at once
  • TanyaYatskovska's avatar
    TanyaYatskovska
    SmartBear Alumni (Retired)
    Hi Sivan,

     


    You are using keyword tests, right? In this case, you use the Find/Replace dialog to find all the lines by the value of the object whose path you need to change. Unfortunately, there is no way to search through the Item column in the Keyword Test editor.