Name mapping
I am using name mapping to create short names (in Test Complete) for all of the dialogs in the software I am testing. Currently I am in the process of cleaning up my code and shortening my script by combing dialogs of similar types. Some of the dialogs in the software I am testing are functionally the same so I want to combined those so that I can call the same mapped names for each. The problem is this:
I have two dialogs
One is titled 'Write this file'
One is titled 'Export this object'
Another dialog that is not the same as these is titled ‘Export this object Wizard’ and it uses the same type of Qt object as the other two dialogs. There is another dialog which is called ‘Open this file’ and another called ‘Import this file’ which also are also different than the two I am trying to map. So if I place the wildcard instead of ‘Write’ or ‘Export’, TC will identify the ‘Import’ or ‘Open’ dialogs as being the same type as the ones I am mapping. If I place the Wildcard after the ‘Export’ or 'Write' than it will identify the ‘Wizard’ as being the same type of object which is also an undesired result. My question is this: is it possible to do the equivalent of the following code segment, in name mapping?
if (caption == "* this file" || caption == "* this object"
{
dialog_mapped_name = exportChooser;
}
else
{
dialog = isSomethingElse;
}
In other words, is there a way to use a conditional statement to identify dialogs based on their caption or another property within the name mapping?
Currently I have a work around in place, but I still have more code than I would like. Any help would be appreciated.
Thanks,
Jonathan L Clark
- Take a look at this blog post: http://blog.smartbear.com/software-quality/bid/170146/
And also try to search here: http://support.smartbear.com/viewarticle/28732/ (Using Advanced Mapping Settings)