the relationship between name mapping map and testscript
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-17-2010
04:27 PM
01-17-2010
04:27 PM
the relationship between name mapping map and testscript
After I recorded several testscript, I just have one NameMapping item in the project. that means all testscripts share one namemapping item in same project? is it possible for one project to contain multiptle nameMapping items? what should testers do if there are overlapped objects cross different test scripts? or different objects have the same name during the recording?
May I add new name mapping definitions into exsiting name mapping items? I know I can delete them.. but not sure I can add or not .
Thanks
Find the faith in life
3 REPLIES 3
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-17-2010
10:28 PM
01-17-2010
10:28 PM
Hi Philip,
>> that means all testscripts share one namemapping item in same project?
That is right.
>> is it possible for one project to contain multiptle nameMapping items?
No.
>> what should testers do if there are overlapped objects cross different test scripts?
What do you mean by "overlapped objects"?
>> different objects have the same name during the recording?
You need to choose a set of properties for mapping that uniquely identifies each object.
>> May I add new name mapping definitions into exsiting name mapping items?
Yes. Double-click the item you need to edit and apply all necessary changes (see the Managing Mapped Objects help topic).
>> that means all testscripts share one namemapping item in same project?
That is right.
>> is it possible for one project to contain multiptle nameMapping items?
No.
>> what should testers do if there are overlapped objects cross different test scripts?
What do you mean by "overlapped objects"?
>> different objects have the same name during the recording?
You need to choose a set of properties for mapping that uniquely identifies each object.
>> May I add new name mapping definitions into exsiting name mapping items?
Yes. Double-click the item you need to edit and apply all necessary changes (see the Managing Mapped Objects help topic).
------
Yuri
TestComplete Customer Care Engineer
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
Yuri
TestComplete Customer Care Engineer
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-18-2010
10:58 AM
01-18-2010
10:58 AM
The overlapped objects means some objects are recreated in the runtime, or the newly created objects which have same reference(classname, wincaption, or index) with the previous ones.. but in different position.
I think you misunderstood my last question. What I mean is can I create a new name mapping definition for objects?
such as : I want to create a new mapping definition in name mapping item:
lookupedit3=Alias[mainForm][gridControl]("lookupedit","3" );
is it possible? and how to do it?
Thanks
Find the faith in life
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-22-2010
12:57 AM
01-22-2010
12:57 AM
Hi Philip,
>>>
The overlapped objects means some objects are recreated in the runtime, or the newly created objects which have same reference(classname, wincaption, or index) with the previous ones.. but in different position.
<<<
If an object is recreated, you need to refresh the mapping information by calling the RefreshMappingInfo method right after the recreation.
If a new object is created, you need to modify the name mapping scheme in such a way that TC can uniquely identify the necessary object (don't forget to call RefreshMappingInfo before obtaining the new object).
>> What I mean is can I create a new name mapping definition for objects?
As far as I understand, you need to add items to the name mapping scheme from your script. You can do this by using the AddNamedChild method (see the Methods and Properties Added to Mapped Objects help topic).
However, we do not recommend that you use this. More convenient approach is to use the FindChild method to find the necessary object by specific property values.
--
Dmitry Nikolaev
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
Dmitry Nikolaev
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
