SPONSORS:






User Tag List

Results 1 to 8 of 8
  1. #1
    Super Member
    Join Date
    Jul 1999
    Location
    Rancho Santa Margarita, CA
    Posts
    1,439
    Post Thanks / Like
    Mentioned
    4 Post(s)
    Tagged
    1 Thread(s)

    Recording Windows Declarations with multitags

    Which of the following Default multitags items combinations have you seen that works best for Recording Windows Declarations of an AUT that is full of CustomWin objects and many without Window IDs (such as a Delphi application)? :

    A) Caption and Index
    B) Caption and Window ID
    C) Caption and Prior Text
    D) Caption and Index
    E) Caption and Location
    f) Caption and all others

  2. #2
    Senior Member
    Join Date
    Aug 1999
    Location
    Cambridge, UK
    Posts
    470
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Recording Windows Declarations with multitags

    Well, it depends on which tag types are most useful to you.
    In our application, we also can't use window ids. Captions are our next choice, but aren't always reliable (silktest tends to get confused if there is a titled border round a group of controls); Prior text is never useful in the situations where captions cannot be used, so we have never used this type of tag; indexes are our next choice, but can't always be used when the controls on a particular window appear and disappear for a variety of reasons (which is annoyingly often in our app, which has fairly complicated business logic affecting the gui level); So sometimes we do get reduced to using location-based tags. These are always possible to use, though make script maintenance a nightmare.

    My advice would be to work out a system of tagging for any particular window, based on what kind of tags are available to you. Sometimes you might mix and match (e.g. where the first ten fields on a window are fixed and always present, you can use the indexes without worrying, but if there are a few near the bottom of the form whose indexes vary because fields above them are sometimes missing, then you might want to use locations there); sometimes you might decide that a policy of strictly using locations only for one window, which would make the task of maintaining that window declaration more straightforward if the locations ever change (and they will do). Sometimes we have found it useful to use subclassing to cope with a window whose fields are present or not present according to business rules which can be taken into account at script runtime.

    So, depending on what kind of policy you adopt towards the window declaration you are entering or editing, should influence what kind of tags to record.

  3. #3
    Guest

    Re: Recording Windows Declarations with multitags

    I had got the same situation earlier with Customwin. But I used following combinations to overcome this problem.

    1. Caption and Index
    2. Caption, WindowsID and Locations

    I hope this may workout for you.


    ------------------
    Satya

  4. #4
    Super Member
    Join Date
    Jul 1999
    Location
    Rancho Santa Margarita, CA
    Posts
    1,439
    Post Thanks / Like
    Mentioned
    4 Post(s)
    Tagged
    1 Thread(s)

    Re: Recording Windows Declarations with multitags

    Thank you all for your responses!
    With an AUT flooded with Custom objects and many invisible objects (not seen by SilkTest at least), I guess the Default multitags options I've been using in Recording Windows Declarations are okay then ( :

    Caption and Index
    then using Location for the invisible ones.

  5. #5
    Senior Member
    Join Date
    Jul 1999
    Location
    New York, NY, USA
    Posts
    137
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Recording Windows Declarations with multitags

    If you can get a caption don't use Index. Index is just one level above location in usefulness in most applications. Windows ID has worked best for me on most custom objects where I couldn't get caption. Remember just because you have multitags enabled doesn't mean you have to use them. I always remove index from everytag in the Include file where I can get another reliable tag, I find I have few if any Object not found or wrong object addressed problems when I do.

    [This message has been edited by woodman (edited 03-22-2001).]

  6. #6
    Super Member
    Join Date
    Jul 1999
    Location
    Rancho Santa Margarita, CA
    Posts
    1,439
    Post Thanks / Like
    Mentioned
    4 Post(s)
    Tagged
    1 Thread(s)

    Re: Recording Windows Declarations with multitags

    woodman,

    Window IDs would have been nice to use, if they are available. Unfortunately in an AUT like the Delphi application I am testing (where the developers love to further customize an already custom object such as CustomWin TButton to a TxyzButton or TabcButton), you'll get very few (maybe 10-30 out of 100) objects that get recorded with a Window ID and all these Window IDs are in the form of
    "$12975" (starts with a $ sign, followed by some random number, except of course for the OK and Cancel buttons which are assigned $1 and $2 at all times). And when the developers decide to make changes to the GUI, these numbers change also and are harder to keep track of compared to using the indexes where if TextField3 (tag "#3") got moved to become TextField8, for example, I can easily rearrange the numbers/indexes 1-10 (if I have 10 TextFields) to match their new locations on the screen. Somehow, the use of indexes in additon to the Captions and Locations have been working fine for me.

  7. #7
    Senior Member
    Join Date
    Jul 1999
    Location
    New York, NY, USA
    Posts
    137
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Recording Windows Declarations with multitags

    Let me qualify one thing, I haven't used silk to test Delphi App. I have used it for VB 3-6, C++, Visual C; Browser testing of HTML, DHTML, XML, ASP, JavaScript and Java.

    That said what I think you want to avoid is having to tweak your include file every time the developers move or add an object. The best way to do that is to get a Unique tag that sticks (doesn't change). Indexes are lousy for this. If you multitag an item in silk and only one tag matches silk will still find the object. This means that If both the text and the index tag change, silk will find the new object that has the specified index. This will cuase the script to act upon the wrong object and I have found this to be very troublesome.

    I use several different approaches to try to keep the tags as simple as possible. If I can get a single unique text identifier for an object it is best. If I can get a WindowsID that doesn't change it is second best. After that I will begin to multitag objects. You have to have a feeling for how silk 'looks' for objects when multi-tagging them. If you used every available tag on an objects it will go through them in the following order:
    1st - Text Tag "abc"
    2nd - Previous Text Tag "^def"
    3rd - Index Tag "#2"
    4th - Windows ID "$optButton"
    As soon as Silktest finds a match, it stops looking. That is why it is best to keep them simple. Keep in mind that you also can wildcard inside of tags, so if you have a particularly long test string that is unique after the 6th character, it is often better to tag it as "abcdef*"

    If you don't wildcard and you can get a unique text identifier, you do not have to run a verification for text for any object you will handle in any of you scripts. This is because if the object is not multi-tagged and you click it, get focus, set active or whatever, you have confirmed that the caption is correct by having it identified in the include an taking an action against it.

    You might want to start another thread here specifying that you need good tagging methodology for Delphi apps because I know there are some here who do this all of the time. There are probably some agent runtime setting that can be changed to help in identification of objects.

    Good Luck,
    Tom


  8. #8
    Super Member
    Join Date
    Jul 1999
    Location
    Rancho Santa Margarita, CA
    Posts
    1,439
    Post Thanks / Like
    Mentioned
    4 Post(s)
    Tagged
    1 Thread(s)

    Re: Recording Windows Declarations with multitags

    Thanks Tom.

    I need to clarify some stuffs also about the Delphi app I am testing and the multitagging I used. Though I choose the Multitag default of Caption and Index for recording Windows Declarations, if the recorded tag for an object show both Caption and Index, I delete the Index portion and switch from multitag to tag.
    Since SilkTest does not recognize StaticText in Delphi (other areas hard to work with are the Delphi Grids and Treeviews), all of the textfields (as I can see) are recorded without corresponding Captions. Their tag would either be indexes or the $198348 (window ID) depending on the options you've chosen and their object names are always TextField1, TextField2, etc. So in short, my choice is always between dealing with the #1, #2s or the $1, $18543 etc. and since the numbers are much harder to remember when they get bigger/longer, I ended choosing the shorter version which is the one from the index 'coz the biggest I have to deal with is a 2-digit index like #25.
    Somehow in Delphi, the captions for textfields are treated as StaticText which SilkTest does not see/recognize.
    Oh well, maybe the upcoming versions of SilkTest will work better with Delphi. For the meantime, as long as the "work-arounds" are working, I'm happy : )

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

vBulletin Optimisation provided by vB Optimise v2.6.0 Beta 4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.0.9 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Questions / Answers Form provided by vBAnswers (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominatevBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 05:58 PM.

Copyright BetaSoft Inc.