i have an AUT wherein the tags of certain controls change dynamically. i have a progress dialog that is kinda generic and there are several operations in my application that invoke this progress dialog. for example, i have a static text control which has a tag id of $1000, the first time I did a windows declaration. then, the next time i try to manipulate that control it fails 'coz silktest doesn't recognize it anymore since the tag id now is $2000. what's the work around this? i thought of using a wildcard but now, i might have trouble uniquely identifying the controls in my dialog.
any help and direction is appreciated.
Re: dynamic tags
Two or three approaches.
</font><ul type="square">[*]<font size="2" face="Verdana, Arial, Helvetica">Wild Cards, but you don't want to use them.</font>[*]<font size="2" face="Verdana, Arial, Helvetica">Multitaggin, if the values of the tags that are changing dynamically fall within some particular range of limit, maybe multitaggin could be a way out.</font>[*]<font size="2" face="Verdana, Arial, Helvetica">Declare a class with all the controls in that dialog, Derive instances for all the possible ways of invoking the dialog and add correct tags to each instance.
Note: The above has following assumptions
a] The tags which change dynamically for the same dialog are consistent when invoked thru the same method.
b] The number of ways of invoking this dialog is tolerably less, or the number of instances that you'd have to derive will not be worth the exercise.</font>[*]<font size="2" face="Verdana, Arial, Helvetica">Try fetching the tag of the window runtime, with GetTag, run some valid checks to determine its uniqueness, and go ahead.
Note: I'm not sure about the GetTag, doin this without a copy of Silk Test. Please check the help.</font>[*]<font size="2" face="Verdana, Arial, Helvetica">This is something that I'd really go for if the constraints that you mention are to the extremes. Get a single declaration of the dialog and declare the tag as a acceptable wildcard and the parent as "~ActiveApp/[DialogBox]#1/[DialogBox]#2" depending on which level the dialog box is invoked.
Note: For the above the following assumptions are made.
a)The app has dialogs which are modal, meaning only one such dialog can be present at a time on the desktop. No other dialog of the same child level is present.
b)All the different ways of invoking the dialog happen at the same child level.</font>[/list]<font size="2" face="Verdana, Arial, Helvetica">
P. S. By child level what I mean is the direct number of parents needed to be dismissed to reach the main window.
Life, that dares send, A challenge to his end,
And when it comes say, Welcome friend.