Forum Discussion
Hi Tushar,
TestComplete can update its Name Mapping during the test execution. Please refer to the "Name Mapping Options Dialog" ( http://smartbear.com/viewarticle/55302/ ) help topic to learn if this option is OK for you.
- rajvanshNew Contributor
Hi Tanya,
Thanks for your response!!!
We checked the 'Update Name Mapping during test run' checkbox. However when we run the scripts on application with modified objects, the script fails to recognize/modify object at runtime.
Also as per the description for this option "If this option is selected, TestComplete prompts you to update invalid mapping criteria found during the test run.". It looks like the user would be prompted to update the namemapping. What we are looking to do is modify the name mapping before automatically.
Please cosider the following scenario...
1. Theere is a button 'Ok' (WndCaption=OK)in our application which is already mapped.
2. Now name of the button has changed to 'Ok1'(WndCaption=Ok1).
3. We want the name mapping to either get updated via a setting in TC OR if there is a possibilty changing the properties directly into namemapping by code.
Current:
OBJ1.WndCaption=OK
Expected:
OBJ1.WndCaption=Ok1
I tried storing the Oject property as a variable and updated it during execution. However this is not efficien for the high no. changes that we need to handle.
Regards,
Tushar
- lleppertContributor
Hi rajvansh,
The namemapping file can be opened in a text editor and edited that way. Therefore, if you know the old object names and what they are being changed to you can simply perform a find and replace int he text editor. If you have multiple namemapping files, like we do, you can create a script that will do a find and replace on each file.
Hope that helps,
Lauren