Forum Discussion

alex4286's avatar
alex4286
Occasional Contributor
2 months ago
Solved

updating already mapped items to new objects

Dear Support Team, I’m currently working on a test project where the system under test has changed, and as a result, several previously mapped UI objects are no longer available (they are missing or...
  • Hassan_Ballan's avatar
    Hassan_Ballan
    2 months ago

    I re-suggest having a good read of https://support.smartbear.com/testcomplete/docs/testing-with/object-identification/name-mapping/index.html to have deep understanding on how it works to be able to manipulate.

    The links to navigate: Mapped Object > Mapped Alias > Script reference
    In your script you can right click on an action to select speed menu to take you the the Mapped Alias, similarly from the Mapped Alias you can right click on the node to select speed menu to find the Mapped Object.

    1. In the following I intentionally made the path different from Object and Alias to reflect how it actually operates. When you rename Mapped Object Sys.a.b.c.d.e.Button to ButtonOld it will automatically prompt you to rename the Mapped Alias Aliases.a.b.Button and all KeywordTest script references.

    2. When your application mapping path change, and since your scripts are referencing the Alias you can simply modify the Object by drag and drop Button from "e." to higher parent "d." from Sys.a.b.c.d.e.Button to Sys.a.b.c.d.Button. In other cases you can even move it up to "c." and enable/check the extended find to search for it in all children. NOTE: Object and Alias path should not contradict and usually the Alias path skips many of the Object path nodes.

    3. In Alias path when you move one node to a higher parent it will automatically prompt you to update all KeywordTest script references.

    4. The Object and Alias node identification are one and the same. You can update the node identification (by clicking on the image button refresh) and all script references do not need to be updated but are affected immediately.

    5. You can copy an Object node from one project to another, than drag it and drop it in the Alias, and copy the Alias path to use in your script action.

    I suggest you create a test project to play with as you can easily make an irrecoverable mistake.

    💬 Found the answer helpful? Give it a Kudos by clicking Like!
    ✅ Got your issue resolved? Click Mark as Solution so others can find it quickly.