SPONSORS:






User Tag List

Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  1. #1
    Junior Member
    Join Date
    Jun 2000
    Location
    Princeton, NJ
    Posts
    13
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Window ID\'s change each time screen is re-drawn

    I am using SilkTest with Blue Express to test a mainframe application. I've come across something strang in the declarations. The window ID's change each time the screen is re-drawn. The ID's will be increased or decreased by 1024 each time the screen is re-drawn. For example one field has an ID of $259, the next time the screen is accessed it is $1283, the next time it goes back to $259, the next time back to $1283 and so on.

    Has anyone run into this? Do you know why it may be happening? Is there anyway to stop this behaviour or do I need to have a tag function that will increment the tag by 1024 and look again if the object is not found on the first try?

    We're basically looking for information about why this is happening so we can come up with a plan of attack. Any help would be greatly appreciated. Thanks.

    ------------------

  2. #2
    Senior Member
    Join Date
    Jan 2001
    Posts
    750
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Window ID\'s change each time screen is re-drawn

    1)App tag can be many, is the Window ID your only available tag?? YOu can use also use name,and index. Usually the topmost app has index 1.

    2)use the mswfun32.inc , there are a couple winapi you can use to get the topmost window's ID, then change the name of that window. Afterwards you try to reference the window using the new name. If this works do it after you resize.

    ------------------

  3. #3
    Junior Member
    Join Date
    Jul 2001
    Posts
    24
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Window ID\'s change each time screen is re-drawn

    I'm not terribly familiar with BlueExpress, but *if* it supports multitags, you can always use a multitag for that particular window, like so:

    window DialogBox Foo
    multitag "$259"
    "$1283"

    Yes? No? Maybe?

    Lisa
    If it wasn't for disappointments
    I wouldn't have any appointments.
    -- They Might Be Giants

  4. #4
    Junior Member
    Join Date
    Jun 2000
    Location
    Princeton, NJ
    Posts
    13
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Window ID\'s change each time screen is re-drawn

    Thanks for the replies.

    Unfortunately, the Window ID is the best choice for tags. It is a dynamic screen with various hidden/unhidden fields that really throw off any kind of indexing. So we definitely need to stick with the ID's for all of the objects on a particular screen.

    As far as multitags, that is what I am using now to handle the changing ID's. We'd just feel a lot more comfortable if we knew what was causing them to change.


    ------------------

  5. #5
    Junior Member
    Join Date
    Jun 2001
    Location
    Tampa, FL, USA
    Posts
    11
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Window ID\'s change each time screen is re-drawn

    I've run into a similar situation but with checkboxes that showed up within a window. The checkboxes showed up conditionally and each one had different id's which were dynamic. The way I was able to resolve this was by using the dynamic instantiation for that object.
    I'm not sure if this would be a valid solution for you since it's a window that has the dynamic window id's but just throwin some ideas out there.

    ------------------

  6. #6
    Senior Member
    Join Date
    Jul 2001
    Location
    Westford, MA, USA
    Posts
    160
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Window ID\'s change each time screen is re-drawn

    I don't know anything about Blue Express either, but....
    Especially since you can identify a pattern to your changing IDs (increasing/decreasing by 1024), I'd guess that your AUT is assigning these IDs via a macro executed upon each redraw at runtime. If the Blue Express developers want to do it this way, there's nothing you can do about the fact that the IDs are changing - they're assigned by the AUT. Sorry about that.

    ------------------

  7. #7
    Member
    Join Date
    Dec 2000
    Location
    San Francisco, CA
    Posts
    51
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Window ID\'s change each time screen is re-drawn

    It is not really recommended to use window IDs as tags especially for non-web apps. The reason for this (as far as I know) is that it is OS generated just as like as process IDs (PID). If you try to run notepad at least twice (closing previous instance) first you will notice that you would not get the same PID.

    But sometimes I know that using window ID tags seems to be the only way (sucks). Well there are plenty of options previous text, location... And if all doesn't seem to work as well I suggest this.

    The usual workaround that I do is just treat the object as a generic control without any tag and then override the functions or properties you need to access. What no tags??? Yes, but of course, this would require some other means of "recognition mechanism" and I am using previous "tag recognized" objects. To illustrate here is a minimal code snippet:
    ------------------
    kalabog73@hotmail.com

    [This message has been edited by kalabog (edited 08-27-2001).]

  8. #8
    Senior Member
    Join Date
    Aug 1999
    Location
    San Diego, CA USA
    Posts
    219
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Window ID\'s change each time screen is re-drawn

    I strongly disagree with the opening sentence in the previous reply. As a matter of fact, Segue actually teaches (and has for years) that WindowId is the preferred tag format for client apps, especially when your AUT is going to be internationalized and you might have to test it in another language.

    I have never worked with Blue Express but I have worked extensively with PowerBuilder, VB, and MS C/C++ client apps and have been very successful with WindowId tags. I just wish I had them available with my Java app.

    I have never seen the numeric WindowId values change in the pattern you initially described. It almost sounds like a screen resolution thing or something.

    But I have seen ActiveX controls for toolbars and menus where the WindowId values are all numbers and they change from build to build. I talked with my developers and they told me they couldn't explicitly name the controls - a limitation of the development environment, compiler, something between the programmer and me. I talked with my compiler/build guru person and he tweaked a few things then the values still reamined numbers but they stopped changing with each build. It was a compiler optimization setting that Development was OK with changing to support automated testing.

    ------------------


    [This message has been edited by pcostigan (edited 08-27-2001).]

  9. #9
    Senior Member
    Join Date
    Oct 1999
    Location
    Tyngsborough, MA
    Posts
    211
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Window ID\'s change each time screen is re-drawn

    Kalabog, where did you hear that?

    Don't mean to hammer you over the head, but I almost choked when I read that. I test non-web apps and I find the ID to be the most reliable tag. Be careful when giving out information like that.

    ------------------

  10. #10
    Member
    Join Date
    Dec 2000
    Location
    San Francisco, CA
    Posts
    51
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Window ID\'s change each time screen is re-drawn

    <BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Originally posted by pcostigan:
    I strongly disagree with the opening sentence in the previous reply. As a matter of fact, Segue actually teaches (and has for years) that WindowId is the preferred tag format for client apps, especially when your AUT is going to be internationalized and you might have to test it in another language.

    I have never worked with Blue Express but I have worked extensively with PowerBuilder, VB, and MS C/C++ client apps and have been very successful with WindowId tags. I just wish I had them available with my Java app.

    I have never seen the numeric WindowId values change in the pattern you initially described. It almost sounds like a screen resolution thing or something.

    But I have seen ActiveX controls for toolbars and menus where the WindowId values are all numbers and they change from build to build. I talked with my developers and they told me they couldn't explicitly name the controls - a limitation of the development environment, compiler, something between the programmer and me. I talked with my compiler/build guru person and he tweaked a few things then the values still reamined numbers but they stopped changing with each build. It was a compiler optimization setting that Development was OK with changing to support automated testing.

    <HR></BLOCKQUOTE>

    Hmmm... so I wasn't really taught well (shame), nobody to blame but myself most of what I know are self-taught (also peers).

    I think BlueExpress is a support for legacy apps running on TE like Xtra. And I am really not sure if there may be a way for the app developers to provide an explicit name for the controls for it would depend on your TE program. So I think no one can really take advantage of window IDs in this situation.

    Anyway, thank you very much for that informative thought and I really retract my previous statement about recommending window IDs

    ------------------
    kalabog73@hotmail.com

 

 
Page 1 of 2 12 LastLast

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 11:02 PM.

Copyright BetaSoft Inc.